Created
May 26, 2020 12:23
-
-
Save craigtaub/cc115c2220f559048580fd8fc77a3313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Spec(runner, options) { | |
Base.call(this, runner, options); | |
runner.on(Runner.constants.EVENT_RUN_BEGIN, function () { | |
Base.consoleLog(); | |
}); | |
// more .... | |
runner.on(Runner.constants.EVENT_TEST_PASS, function (test) { | |
var fmt = | |
indent() + | |
color("checkmark", " " + Base.symbols.ok) + | |
color("pass", " %s") + | |
color(test.speed, " (%dms)"); | |
Base.consoleLog(fmt, test.title, test.duration); | |
}); | |
runner.on(Runner.constants.EVENT_TEST_FAIL, function (test) { | |
Base.consoleLog(indent() + color("fail", " %d) %s"), ++n, test.title); | |
}); | |
runner.once(Runner.constants.EVENT_RUN_END, self.epilogue.bind(self)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment