• Make an assertion that actual and expected are not equal, deeply. If not then throw.

    Type Parameters

    • T

    Parameters

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

    Returns void

    Since

    24.7.0

    Type parameter can be specified to ensure values under comparison have the same type.

    Example

    import { assertNotEquals } from "assert";

    assertNotEquals(1, 2); // Doesn't throw
    assertNotEquals(1, 1); // Throws