num.js 337 B

123456789101112131415
  1. 'use strict';
  2. var test = require('tape');
  3. var ent = require('../');
  4. test('opts.numeric', function (t) {
  5. var a = 'a & b & c';
  6. var ax = 'a & b & c';
  7. var b = '<html> © π " \'';
  8. var bx = '&#60;html&#62; &#169; &#960; &#34; &#39;';
  9. t.equal(ent.encode(a), ax);
  10. t.equal(ent.encode(b), bx);
  11. t.end();
  12. });