Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save craigtaub/cc115c2220f559048580fd8fc77a3313 to your computer and use it in GitHub Desktop.
Save craigtaub/cc115c2220f559048580fd8fc77a3313 to your computer and use it in GitHub Desktop.
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