deno_std
deno_std copied to clipboard
assertStrictEquals(-0, +0) should not throw
Describe the Bug According to the Strict Equality Comparison Algorithm of the Javascript standard, -0 and +0 are considered equal.
Assuming that assertStrictEquals
is meant to assert equality in the sense of actual === expected
, it should not throw when passing -0 and +0 for actual
and expected
.
Steps to Reproduce
import { assert, assertStrictEquals } from "https://deno.land/[email protected]/assert/mod.ts";
assert(-0 === +0); // passes
assertStrictEquals(-0, +0); // fails
Expected Behavior
assertStrictEquals(-0, +0)
should not throw.
Environment
- OS: macOS
- deno version: 1.43.2
- std version: 0.224