Skip to content

Commit

Permalink
[fixes #841] ensure testEnvironment.{beforeEach,afterEach} are released
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Aug 4, 2015
1 parent 29ca2e8 commit 6ee0583
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test.js
Expand Up @@ -70,9 +70,11 @@ Test.prototype = {

config.current = this;

if (this.module.testEnvironment) {
delete this.module.testEnvironment.beforeEach;
delete this.module.testEnvironment.afterEach;
}
this.testEnvironment = extend( {}, this.module.testEnvironment );
delete this.testEnvironment.beforeEach;
delete this.testEnvironment.afterEach;

this.started = now();
runLoggingCallbacks( "testStart", {
Expand Down

0 comments on commit 6ee0583

Please sign in to comment.