-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: fixed incorrect assertion in jest-worker unit tests. #15467
fix: fixed incorrect assertion in jest-worker unit tests. #15467
Conversation
✅ Deploy Preview for jestjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, thanks!
CHANGELOG.md
Outdated
@@ -93,6 +93,7 @@ | |||
- `[jest-util]` Always load `mjs` files with `import` ([#15447](https://github.com/jestjs/jest/pull/15447)) | |||
- `[jest-worker]` Properly handle a circular reference error when worker tries to send an assertion fails where either the expected or actual value is circular ([#15191](https://github.com/jestjs/jest/pull/15191)) | |||
- `[jest-worker]` Properly handle a BigInt when worker tries to send an assertion fails where either the expected or actual value is BigInt ([#15191](https://github.com/jestjs/jest/pull/15191)) | |||
- `[jest-worker]` Resolved an incorrect assertion in the unit tests of the `jest-worker` package. ([#15467](https://github.com/jestjs/jest/pull/15467)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need a changelog entry for a test change 🙂
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
The unit test in
jest-workers
package had an incorrect assertion as show below:Failing Test:

The source code for the above test can be found here
As we can see, the assertion in the above linked file is incorrect. We need to compare the actual
object
and not thetype
of it. Removing thetypeof
operator and passing the object is the correct assertion.This PR fixes this issue by removing the
typeof
operator:Test plan
The test passes after removing the

typeof
operator.The commands I ran are: