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