-
-
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
toStrictEqual
does not consider arrays with objects having undefined values correctly
#7937
Labels
Comments
dubzzz
added a commit
to dubzzz/fast-check
that referenced
this issue
Feb 19, 2019
Seems that there is a regression on Jest: jestjs/jest#7937
dubzzz
added a commit
to dubzzz/jest
that referenced
this issue
Feb 19, 2019
dubzzz
added a commit
to dubzzz/jest
that referenced
this issue
Feb 19, 2019
dubzzz
added a commit
to dubzzz/jest
that referenced
this issue
Feb 20, 2019
thymikee
pushed a commit
that referenced
this issue
Feb 20, 2019
…d values correctly (#7938) <!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> <!-- Please remember to update CHANGELOG.md in the root of the project if you have not done so. --> ## Summary Fixes #7937: `toStrictEqual` does not consider arrays with objects having undefined values correctly ## Test plan Before that change, the following assertion was failing: ```js expect([{a: undefined}]).not.toStrictEqual([{}]); ``` Now it passes as expected.
9 tasks
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
💥 Regression Report
toStrictEqual
does not consider arrays with objects having undefined values correctly.Starting at 24.0.0,
[{a: undefined}]
is strict equal to[{}]
- while{a: undefined}
and{}
are not strict equal.Last working version
Worked up to version: 23.6.0
Stopped working in version: 24.0.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The following assertion should not fail:
Indeed
{a: undefined}
is not{}
.Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: