Skip to content

Commit a9a322f

Browse files
thymikeecpojer
authored andcommitted
Reset context between test functions (#3506)
1 parent 3d2827c commit a9a322f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/jest-jasmine2/src/jasmine-async.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function promisifyLifeCycleFunction(originalFn, env) {
3737
// We make *all* functions async and run `done` right away if they
3838
// didn't return a promise.
3939
const asyncFn = function(done) {
40-
const returnValue = fn.call(this);
40+
const returnValue = fn.call({});
4141

4242
if (isPromise(returnValue)) {
4343
returnValue.then(done, done.fail);
@@ -67,7 +67,7 @@ function promisifyIt(originalFn, env) {
6767
}
6868

6969
const asyncFn = function(done) {
70-
const returnValue = fn.call(this);
70+
const returnValue = fn.call({});
7171

7272
if (isPromise(returnValue)) {
7373
returnValue.then(done, done.fail);

0 commit comments

Comments
 (0)