unvalid.js 251 B

123456789101112131415
  1. var test = require('tape');
  2. var Parser = require('../');
  3. test('unvalid', function (t) {
  4. var count = 0;
  5. var p = new Parser();
  6. p.onError = function (value) {
  7. count++;
  8. t.equal(1, count);
  9. t.end();
  10. };
  11. p.write('{"test": eer[');
  12. });