-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
assert: make partialDeepStrictEqual work with urls and File prototypes #56231
base: main
Are you sure you want to change the base?
assert: make partialDeepStrictEqual work with urls and File prototypes #56231
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56231 +/- ##
==========================================
- Coverage 88.54% 88.52% -0.02%
==========================================
Files 657 657
Lines 189899 189975 +76
Branches 36465 36488 +23
==========================================
+ Hits 168140 168170 +30
- Misses 14966 14994 +28
- Partials 6793 6811 +18
|
test/parallel/test-assert-objects.js
Outdated
@@ -271,6 +271,16 @@ describe('Object Comparison Tests', () => { | |||
actual: { dataView: new Uint8Array(3) }, | |||
expected: { dataView: new DataView(new ArrayBuffer(3)) }, | |||
}, | |||
{ | |||
describe: 'throws when comparing Float32Array([+0.0]) with Float32Array([-0.0])', |
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.
describe: 'throws when comparing Float32Array([+0.0]) with Float32Array([-0.0])', | |
description: 'throws when comparing Float32Array([+0.0]) with Float32Array([-0.0])', |
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.
🤦 this must have been the autocomplete ... thanks 😄
40e6cba
to
943cb6d
Compare
this PR should close the gap between
assert.deepStrictEqual
andassert.partialDeepStrictEqual
even more.Found a couple more cases that were not properly working:
Object.getPrototypeOf(File.prototype)
andBlob.prototype
new Float32Array([+0.0])
andnew Float32Array([-0.0])
were considered equal, which is not the case