question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[@storybook/addon-storyshots] Support for other test runners (vitest)

See original GitHub issue

Is 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:open
  • Created 2 years ago
  • Reactions:21
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
AndrewLeedhamcommented, Feb 25, 2022

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 ?

1reaction
MichaelBitardcommented, Nov 21, 2022

@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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found