BUPKIS
    Preparing search index...

    Variable snapshotAssertionWithOptionsConst

    snapshotAssertionWithOptions: AssertionFunctionSync<
        readonly [
            ZodUnknown,
            readonly [
                "to match snapshot",
                "to match the snapshot",
                "to equal snapshot",
                "to equal the snapshot",
            ],
            ZodNonOptional<ZodUnknown>,
            "with options",
            ZodObject<
                { hint: ZodOptional<ZodString>; serializer: ZodOptional<ZodAny> },
                $strip,
            >,
        ],
        (
            actual: unknown,
            context: unknown,
            options: { hint?: string; serializer?: any },
        ) => void | AssertionFailure,
        readonly [
            ZodUnknown,
            PhraseLiteralChoiceSlot<
                readonly [
                    "to match snapshot",
                    "to match the snapshot",
                    "to equal snapshot",
                    "to equal the snapshot",
                ],
            >,
            ZodNonOptional<ZodUnknown>,
            PhraseLiteralSlot<"with options">,
            ZodObject<
                { hint: ZodOptional<ZodString>; serializer: ZodOptional<ZodAny> },
                $strip,
            >,
        ],
    > = ...

    Asserts that a value matches a stored snapshot with custom options.

    This is an extended version of snapshotAssertion that accepts explicit options for serialization and snapshot naming via the with options syntax.

    import test from 'node:test';
    import { expect } from 'bupkis';

    test('redacts sensitive fields', (t) => {
    const data = { username: 'alice', password: 'secret123' };

    expect(data, 'to match snapshot', t, 'with options', {
    serializer: (value: any) =>
    JSON.stringify({ ...value, password: '[REDACTED]' }, null, 2),
    });
    });
    test('workflow stages', (t) => {
    const stage1 = { phase: 'init' };
    expect(stage1, 'to match snapshot', t, 'with options', {
    hint: 'stage-1',
    });

    const stage2 = { phase: 'processing' };
    expect(stage2, 'to match snapshot', t, 'with options', {
    hint: 'stage-2',
    });
    });

    The value to snapshot (any type)

    Test context object or explicit snapshot name

    Serialization and naming options

    unknown-to-match-snapshot-with-options

    snapshot