Created
June 6, 2020 17:28
-
-
Save craigtaub/5d955b9905b1db61cc722e7437770881 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
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