BUPKIS
    Preparing search index...

    Variable functionThrowsAssertionConst

    functionThrowsAssertion: AssertionFunctionSync<
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            "to throw",
        ],
        (
            subject: (...args: unknown[] | readonly unknown[]) => unknown,
        ) => { message: string } | undefined,
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            PhraseLiteralSlot<"to throw">,
        ],
    > = ...

    Assertion for testing if a function throws an error when called.

    expect(() => {
    throw new Error('oops');
    }, 'to throw'); // passes
    expect(() => 'hello', 'to throw'); // fails

    function-to-throw-any

    function

    to-throw