Replace identity equality with Object.is in toBe matcher#4917
Replace identity equality with Object.is in toBe matcher#4917cpojer merged 1 commit intojestjs:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4917 +/- ##
=======================================
Coverage 59.98% 59.98%
=======================================
Files 198 198
Lines 6563 6563
Branches 4 4
=======================================
Hits 3937 3937
Misses 2626 2626Continue to review full report at Codecov.
|
|
This is great! Thank you so much. |
|
This needs an entry in the changelog (in general, all should be there, but this in particular is a breaking change, so should definitely be there). @mkubilayk wanna send a PR for it? |
|
@SimenB sure, will send it today. |
|
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
This replaces the strict equality (
===) check withObject.isin thetoBematcher.Object.isworks exactly the same as triple equals except:Hence, this allows us to fix #4907.
Test plan
Added two tests for
toBematcher. I couldn't test the docs due to #4911 and #4912, but changes are trivial.