Closed nathan815 closed 1 year ago
It depends on which node version you're checking. In node < 14, that assert example throws.
It would be a breaking change for deep-equal to make the same change; I noted this in 93679546.
In other words, in v3, this will change, but for now it's stuck with the node < 14 semantics.
@ljharb Ah, ok. Thanks!
Enabling the strict
option makes it work like Node 14's assert.deepEqual for NaN values, so I'll just run it with that option.
Right, it’s only loose equality where this applies.
Node version: 15.14.0 deep-equal version: 2.0.5
Test:
I was expecting
deep-equal
to return true.Node's assert.deepEqual says the above objects are equal:
And this NaN unit test seems to assert that it returns true (?)
Is returning false the expected behavior?