num.js 326 B

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