Skip to content

Commit

Permalink
Test: Release module hooks to avoid memory leaks
Browse files Browse the repository at this point in the history
Fixes #841
Closes #842
  • Loading branch information
stefanpenner authored and leobalter committed Aug 13, 2015
1 parent d1564e1 commit fdf00a4
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 fdf00a4

Please sign in to comment.