html.js 354 B

12345678910111213141516
  1. var test = require('tap').test;
  2. var fs = require('fs');
  3. var check = require('../');
  4. var src = '<html></html>';
  5. test('html', function (t) {
  6. var err = check(src, 'foo.js');
  7. t.ok(err);
  8. t.equal(err.line, 1);
  9. t.equal(err.column, 1);
  10. t.equal(err.message, 'Unexpected token');
  11. t.ok(/foo.js:1/.test(err), 'foo.js:1');
  12. t.end();
  13. });