Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .changeset/tidy-cameras-share.md

This file was deleted.

18 changes: 18 additions & 0 deletions packages/storybook-addon-vis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# CHANGE LOG

## 4.2.4

### Patch Changes

- [#836](https://github.com/repobuddy/visual-testing/pull/836) [`e135d00`](https://github.com/repobuddy/visual-testing/commit/e135d0086a4e20008edb88f65946f1ab8cc47500) Thanks [@unional](https://github.com/unional)! - Gate the auto-snapshot hooks on the Vitest browser global instead of a general test-environment check.

`beforeAll` and `beforeEach` guarded on `isRunningInTest()` from `@repobuddy/test`, which treats any
`HeadlessChrome` user agent as a test run. Browsing Storybook with a headless browser — driving it
with Playwright to debug a story, for example — therefore entered the snapshot setup path, where the
`vitest/browser` command proxy is empty, and failed with `commands.setupVisSuite is not a function`
so the preview never rendered.

Both hooks now check `__vitest_browser__`, the same signal the command proxy itself uses, so they
run exactly when the Vitest commands they depend on are present. This also covers a non-browser
Vitest run (jsdom or node), which passed the old guard and hit the same empty proxy.

`@repobuddy/test` is no longer a runtime dependency of this package.

## 4.2.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook-addon-vis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "storybook-addon-vis",
"version": "4.2.3",
"version": "4.2.4",
"description": "Storybook Vitest visual testing addon",
"keywords": [
"image-snapshot",
Expand Down