• Make an assertion that actual is less than or equal to expected. If not then throw.

    Type Parameters

    • T

    Parameters

    • actual: T
    • expected: T
    • Optional msg: string

    Returns void

    Since

    24.7.0

    Example

    import { assertLessOrEqual } from "assert";

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