BUPKIS
    Preparing search index...

    Interface SnapshotOptions

    Options for snapshot assertions.

    These options control how snapshots are created, matched, and stored.

    interface SnapshotOptions {
        hint?: string;
        serializer?: SnapshotSerializer;
    }
    Index

    Properties

    Properties

    hint?: string

    Optional hint for the snapshot name.

    This can be used to give snapshots more descriptive names, especially when multiple snapshots exist in a single test.

    {
    "hint": "after-user-login"
    }
    // Results in snapshot name: "test name [after-user-login]"
    serializer?: SnapshotSerializer

    Custom serializer for the snapshot value.

    If provided, this serializer will be used instead of the default serialization logic. This is useful for:

    • Redacting sensitive data
    • Custom formatting
    • Framework-specific serialization
    {
    serializer: (value) => {
    // Redact passwords before snapshotting
    return JSON.stringify({ ...value, password: '[REDACTED]' }, null, 2);
    }
    }