Function assertStringIncludes

  • Make an assertion that actual includes expected. If not then throw.

    Parameters

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

    Returns void

    Since

    24.7.0

    Example

    import { assertStringIncludes } from "assert";

    assertStringIncludes("Hello", "ello"); // Doesn't throw
    assertStringIncludes("Hello", "world"); // Throws