From 4cff4e75bbae4ae7874755c2d1ad9d6031c80c5f Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Mon, 25 Jun 2018 10:35:55 -0600 Subject: [PATCH] fixed test --- test/cli/testworker.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/cli/testworker.js b/test/cli/testworker.js index 395d96c0..e9059db1 100644 --- a/test/cli/testworker.js +++ b/test/cli/testworker.js @@ -14,7 +14,9 @@ function compile(tool, code, platform, callback, outlen, nlines, nerrors) { } function doBuild(msgs, callback, outlen, nlines, nerrors) { + var msgcount = msgs.length; global.postMessage = function(msg) { + if (!msg.unchanged) { if (msg.errors && msg.errors.length) { console.log(msg.errors); assert.equal(nerrors, msg.errors.length, "errors"); @@ -23,7 +25,11 @@ function doBuild(msgs, callback, outlen, nlines, nerrors) { assert.equal(msg.output.code?msg.output.code.length:msg.output.length, outlen, "output binary"); assert.equal(msg.lines.length, nlines, "listing lines"); } + } + if (--msgcount == 0) callback(null, msg); + else + console.log(msgcount + ' msgs left'); }; for (var i=0; i