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