Themes
This example uses @storybook/addon-themes to switch a dark class on the page. The Vitest setup registers a light and a dark hook through vis.setup({ auto }), so each snapshot story is captured once per theme.
The stories cover the ways to ask for a snapshot: 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.