[@storybook/addon-storyshots] Support for other test runners (vitest)
See original GitHub issueIs your feature request related to a problem? Please describe
@storybook/addon-storyshots
is tied to running in a Jest environment, so in projects using other test runners it is hard to integrate.
Describe the solution you’d like
@storybook/addon-storyshots
to support other test runners like Vitest.
Describe alternatives you’ve considered I tried to replace the globals Jest provides with those from Vitest, but had no luck.
Are you able to assist to bring the feature to reality? Maybe depends on what solution would fit best in Storybook.
Additional context Some discussion of options can be seen here: https://github.com/vitest-dev/vitest/discussions/700#discussioncomment-2251223
Issue Analytics
- State:
- Created 2 years ago
- Reactions:21
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Storyshots Addon | Storybook: Frontend workshop for UI ...
Create a new test file with the name Storyshots.test.js . (Or whatever the name you ... Storyshots addon is currently supporting React, Angular...
Read more >Storybook Vitest Addon | Storybook: Frontend workshop for UI ...
Addon meant to display Vitest unit test results in a new Stoybook panel. Developed and tested with React. Simply add it to the...
Read more >Test runner Addon | Storybook: Frontend workshop for UI ...
Storybook test runner turns all of your stories into executable tests. ... Adding the test runner to other CI environments; Merging test coverage...
Read more >Visual tests - Storybook
Visual tests, also called visual regression tests, catch bugs in UI appearance. ... For a self-managed alternative to Chromatic, we offer StoryShots.
Read more >Snapshot tests - Storybook
Any time you write or update a story, you get a snapshot test for free. Example Snapshot test. Setup Storyshots. Storyshots is the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That would make a lot of sense. So it would be something like:
@storybook/addon-storyshots
: Core APIs for getting stories/loaders from Storybook. And then:@storybook/addon-storyshots-jest
,@storybook/addon-storyshots-vite
,@storybook/addon-storyshots-puppeteer
,@storybook/addon-storyshots-cypress
which are all adapters for their respective test-runners.Thoughts @shilman ?
@djindjicdev22 sure, here is our exact code source in our repo: https://github.com/MTES-MCT/camino/blob/master/packages/ui/src/storybook.spec.ts
let me know if you need more information 😃