I believe this is a bug in should.js due to a special value NaN as NaN is not equal to itself.
({
a: 1,
c: 3,
b: 2,
d: NaN
}).should.eql({
a: 1,
c: 3,
b: 2,
d: NaN
});
This test case fails while it seems pretty obivious that it should pass.
Any suggestions on how to go about on this test case?
NaN
is special in that it is not equal to itself.This is not a bug.
NaN
is not equal to anything. See MDN for more info.