Last active
May 26, 2020 12:18
-
-
Save craigtaub/871d6a0d886f875ed2a2c1ec8b7f7fd5 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
Mocha.prototype.run = function (fn) { | |
var suite = this.suite; | |
var options = this.options; | |
options.files = this.files; | |
var runner = new Runner(suite, options.delay); | |
createStatsCollector(runner); | |
var reporter = new this._reporter(runner, options); | |
const noop = () => ""; | |
function done(failures) { | |
fn = fn || noop; | |
if (reporter.done) { | |
reporter.done(failures, fn); | |
} else { | |
fn(failures); | |
} | |
} | |
return runner.run(done); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment