• Make an assertion that actual and expected are equal using Object.is for equality comparison. If not, then throw.

    Type Parameters

    • T

    Parameters

    • actual: T
    • expected: T
    • Optional message: string

    Returns void

    Since

    24.7.0

    Example

    import { assertStrictEquals } from "assert";

    const a = {};
    const b = a;
    assertStrictEquals(a, b); // Doesn't throw

    const c = {};
    const d = {};
    assertStrictEquals(c, d); // Throws