Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 30023f2

Browse files
committed
fix(runner): setTestPreparer does not work
setTestPreparer would always set the testPrepare to config.onprepare during `runner.run()`. This is breaking for code that relies on setTestPreparer directly.
1 parent 58197ea commit 30023f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/runner.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ var Runner = function(config) {
4444
}
4545

4646
this.loadDriverProvider_(config);
47+
this.setTestPreparer(config.onPrepare);
4748
};
4849

4950
util.inherits(Runner, EventEmitter);
@@ -198,8 +199,6 @@ Runner.prototype.run = function() {
198199
throw new Error('Spec patterns did not match any files.');
199200
}
200201

201-
this.setTestPreparer(this.config_.onPrepare);
202-
203202
var gracefulShutdown = function(driver) {
204203
if (driver) {
205204
return driver.getSession().then(function(session_) {

0 commit comments

Comments
 (0)