Function assertFalse

  • Make an assertion, error will be thrown if expr have truthy value.

    Parameters

    • expr: unknown

      The expression to test.

    • msg: string = ""

      The optional message to display if the assertion fails.

    Returns asserts expr is Falsy

    import { assertFalse } from "@std/assert";

    assertFalse(false); // Doesn't throw
    assertFalse(true); // Throws