From 5d2d9227e92e1d853f30b8fe8bbbe747f8aace9f Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 21 Dec 2015 14:04:56 -0500 Subject: [PATCH] test: fix parser tests --- test/test-parser.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/test/test-parser.js b/test/test-parser.js index 70d3883..c756673 100644 --- a/test/test-parser.js +++ b/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; -} \ No newline at end of file +}