Make an assertion that actual and expected are strictly equal, using Object.is for equality comparison. If not, then throw.
actual
expected
The type of the expected value.
The actual value to compare.
The expected value to compare.
Optional
The optional message to display if the assertion fails.
import { assertStrictEquals } from "@std/assert";const a = {};const b = a;assertStrictEquals(a, b); // Doesn't throwconst c = {};const d = {};assertStrictEquals(c, d); // Throws Copy
import { assertStrictEquals } from "@std/assert";const a = {};const b = a;assertStrictEquals(a, b); // Doesn't throwconst c = {};const d = {};assertStrictEquals(c, d); // Throws
Make an assertion that
actualandexpectedare strictly equal, using Object.is for equality comparison. If not, then throw.