Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct overeager hoisting in babel-plugin-jest-hoist #13952

Merged
merged 3 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use 'this' in the class constructor test
  • Loading branch information
jsnajdr committed Feb 27, 2023
commit 7095444583908209019408dc222d65927b78086f
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