For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /config/test/snapshot-format.md.
close
  • English
  • snapshotFormat

    • Type: PrettyFormatOptions
    • Default: { printShadowRoot: false }

    Customize the snapshot format using options from the pretty-format.

    Rstest omits shadow roots from snapshots by default. Set printShadowRoot to true to include them.

    rstest.config.ts
    import { defineConfig } from '@rstest/core';
    
    export default defineConfig({
      snapshotFormat: {
        printBasicPrototype: true,
      },
    });