Browse Source

test: fix parser tests

fork
Brian White 6 years ago
parent
commit
5d2d9227e9
  1. 23
      test/test-parser.js

23
test/test-parser.js

@ -488,7 +488,8 @@ var CR = '\r', LF = '\n', CRLF = CR + LF;
)
);
});
}
} else
stream.resume();
});
try {
@ -499,16 +500,18 @@ var CR = '\r', LF = '\n', CRLF = CR + LF;
console.log(makeMsg(v.what, 'JS Exception: ' + e.stack));
return;
}
assert.deepEqual(result,
v.expected,
makeMsg(v.what,
'Result mismatch:'
+ '\nParsed: ' + inspect(result, false, 10)
+ '\nExpected: ' + inspect(v.expected, false, 10)
)
);
setImmediate(function() {
assert.deepEqual(result,
v.expected,
makeMsg(v.what,
'Result mismatch:'
+ '\nParsed: ' + inspect(result, false, 10)
+ '\nExpected: ' + inspect(v.expected, false, 10)
)
);
});
});
function makeMsg(what, msg) {
return '[' + what + ']: ' + msg;
}
}
Loading…
Cancel
Save