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,
      },
    });