Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save craigtaub/5d955b9905b1db61cc722e7437770881 to your computer and use it in GitHub Desktop.
Save craigtaub/5d955b9905b1db61cc722e7437770881 to your computer and use it in GitHub Desktop.
Runner.prototype.run = function(fn) {
var self = this
var rootSuite = this.suite
fn = fn || function() {}
function start() {
self.started = true
self.emit(Runner.constants.EVENT_RUN_BEGIN)
self.runSuite(rootSuite, function() {
self.emit(Runner.constants.EVENT_RUN_END)
})
}
// callback
this.on(Runner.constants.EVENT_RUN_END, function() {
fn(self.failures)
})
start()
return this
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment