As @Lexicality mentions in issue #223, when asserting 0 against -0, Chai throws AssertionError: expected 0 to deeply equal 0 without any further information.
AssertionError: expected 0 to deeply equal 0
With the check in this PR, Chai throws AssertionError: expected 0 to deeply equal -0.
AssertionError: expected 0 to deeply equal -0
added check for logging negative zero
Nice work @dasilvacontin but there is some serious reverse logic going on here. Surely this would be better written as value === 0 && (1/value) === -Infinity?
value === 0 && (1/value) === -Infinity
I totally agree with that! Thanks for pointing it out, @keithamus ! 😄
a more readable/simple condition statement, as pointed out by @keithamus
LGTM. @logicalparadox am I good to merge?
Missing test asserting this works.
added test for inspecting `-0`
why not more assertions
Added some assertions. If it needs any other change, suggestions are welcome.
Sorry @logicalparadox about missing the test - I'll ensure to be extra vigilant next time!
Sorry for missing it too! :/