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

Commit

Permalink
fix(runner): setTestPreparer does not work
Browse files Browse the repository at this point in the history
setTestPreparer would always set the testPrepare to config.onprepare during
`runner.run()`. This is breaking for code that relies on setTestPreparer
directly.
  • Loading branch information
hankduan committed Nov 6, 2014
1 parent 58197ea commit 30023f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var Runner = function(config) {
}

this.loadDriverProvider_(config);
this.setTestPreparer(config.onPrepare);
};

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

this.setTestPreparer(this.config_.onPrepare);

var gracefulShutdown = function(driver) {
if (driver) {
return driver.getSession().then(function(session_) {
Expand Down

0 comments on commit 30023f2

Please sign in to comment.