Skip to content

Histoire Screenshot with Percy for visual regression testing

You need the Percy CLI installed to be able to send snapshots to Percy.

bash
pnpm add -D @histoire/plugin-percy

Add the plugin in histoire config:

js
import { defineConfig } from 'histoire'
import { HstPercy } from '@histoire/plugin-percy'

export default defineConfig({
  plugins: [
    HstPercy({
      // Options here
    }),
  ],
})

Then use the Percy CLI

bash
# Replace `story:build` with the script to build the stories if you changed it
percy exec pnpm run story:build

Released under the MIT License.