Update app.js

This commit is contained in:
Namhyeon Go 2022-01-27 10:34:48 +09:00 committed by GitHub
parent 85be8e2f90
commit daa47a8fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
app.js
View File

@ -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]) {