BUPKIS
    Preparing search index...

    Variable functionThrowsSatisfyingAssertionConst

    functionThrowsSatisfyingAssertion: AssertionFunctionSync<
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            readonly ["to throw", "to throw error satisfying"],
            ZodUnknown,
        ],
        (
            subject: (...args: unknown[] | readonly unknown[]) => unknown,
            param: unknown,
        ) =>
            | { message: string; schema?: undefined; subject?: undefined }
            | {
                message?: undefined;
                schema: ZodType<any, unknown, $ZodTypeInternals<any, unknown>>;
                subject: {} | null;
            },
        readonly [
            ZodCustom<
                (...args: unknown[] | readonly unknown[]) => unknown,
                (...args: unknown[] | readonly unknown[]) => unknown,
            >,
            PhraseLiteralChoiceSlot<
                readonly ["to throw", "to throw error satisfying"],
            >,
            ZodUnknown,
        ],
    > = ...

    Assertion for testing if a function throws an error matching specific criteria.

    expect(
    () => {
    throw new Error('oops');
    },
    'to throw',
    'oops',
    ); // passes
    expect(
    () => {
    throw new Error('fail');
    },
    'to throw',
    /error/i,
    ); // passes
    expect(
    () => {
    throw new Error('oops');
    },
    'to throw',
    { message: 'oops' },
    ); // passes