Skip to content

Commit

Permalink
Use 'this' in the class constructor test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Feb 27, 2023
1 parent 37e5300 commit 7095444
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jest.mock('some-module', () => {
return class Mocked extends Actual {
constructor() {
super();
jest.spyOn(module, 'add');
jest.spyOn(this, 'add');
}
};
});
Expand All @@ -275,7 +275,7 @@ _getJestObj().mock('some-module', () => {
return class Mocked extends Actual {
constructor() {
super();
_getJestObj().spyOn(module, 'add');
_getJestObj().spyOn(this, 'add');
}
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pluginTester({
return class Mocked extends Actual {
constructor() {
super();
jest.spyOn(module, 'add');
jest.spyOn(this, 'add');
}
};
});
Expand Down

0 comments on commit 7095444

Please sign in to comment.