Multi instances
The Vitest config of this example runs the stories in two Chromium instances, HD (1280 by 720) and SVGA (800 by 600). The snapshotRootDir option puts each instance’s images in its own folder, so one story gets one baseline per viewport.
The stories are the same as in the themes example: the snapshot tag on a component and the tag on a single story. A story that calls toMatchImageSnapshot() in a play function exists in the repository, but it is left out here because that matcher only exists in a Vitest run.
Snapshots are taken during the Vitest run, not in the browser. This Storybook only renders the stories, in your own viewport.