diff --git a/app.js b/app.js index 39e2927..87993a2 100644 --- a/app.js +++ b/app.js @@ -56,12 +56,18 @@ var console = { } return res; }, + _echoCallback: null, _echo: function(args, type) { msg = (typeof(type) !== "undefined" ? type + ": " : "") + this._join(args); if (typeof(WScript) !== "undefined") { WScript.echo(" * " + msg); } this._messages.push(msg); + + // after calling echo + if (typeof this._echoCallback === "function") { + _echoCallback(this); + } }, assert: function(assertion) { if (arguments.length > 1 && assertion === arguments[0]) {