BUPKIS
    Preparing search index...

    Variable errorMessageMatchingAssertionConst

    errorMessageMatchingAssertion: AssertionFunctionSync<
        readonly [
            ZodCustom<Error, Error>,
            "to have message matching",
            ZodCustom<RegExp, RegExp>,
        ],
        (subject: Error, pattern: RegExp) => { message: string } | undefined,
        readonly [
            ZodCustom<Error, Error>,
            PhraseLiteralSlot<"to have message matching">,
            ZodCustom<RegExp, RegExp>,
        ],
    > = ...

    Assertion for testing if an Error has a message matching a regular expression.

    expect(
    new Error('Error: something went wrong'),
    'to have message matching',
    /something/,
    ); // passes
    expect(new Error('All good'), 'to have message matching', /error/i); // fails