Skip to content

Commit

Permalink
Reset context between test functions (jestjs#3506)
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee authored and cpojer committed May 11, 2017
1 parent 3d2827c commit a9a322f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jest-jasmine2/src/jasmine-async.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function promisifyLifeCycleFunction(originalFn, env) {
// We make *all* functions async and run `done` right away if they
// didn't return a promise.
const asyncFn = function(done) {
const returnValue = fn.call(this);
const returnValue = fn.call({});

if (isPromise(returnValue)) {
returnValue.then(done, done.fail);
Expand Down Expand Up @@ -67,7 +67,7 @@ function promisifyIt(originalFn, env) {
}

const asyncFn = function(done) {
const returnValue = fn.call(this);
const returnValue = fn.call({});

if (isPromise(returnValue)) {
returnValue.then(done, done.fail);
Expand Down

0 comments on commit a9a322f

Please sign in to comment.