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.

Storyshot, run individual tests

See original GitHub issue

This #6331 addresses the issue. I think it should have some priority since you can’t develop and run only one test for your story. All the tests will run. This implies a big problem if, for example, you are editing a single component and want to “update” the shot for that component with jest -u, all the conflicting components will be accepted. Ideally, one should update an isolated component, update the shot, and the go through all the conflicts modifying accordingly their context.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:38
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

25reactions
hyperwidgetcommented, Sep 30, 2019

We’re hitting this problem on a pretty large project where we’re hoping to transition to storyshots. Having to run our entire test suite to update a single snapshot is painful. . . so 🙏 and ➕➕

4reactions
varundeycommented, Apr 18, 2020

Using hooks as a pre-commit or pre-push should ideally test only the staged files but because of this problem, it runs tests across all the stories and if any non-related tests are breaking the developer are stuck from pushing their changes upstream. Please consider this feature. 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Snapshot tests - Storybook
Storyshots is the official Storybook addon that enables snapshot testing, powered by Jest. Run the following command to install Storyshots: YARN; NPM.
Read more >
Storybook Snapshot Testing - In Plain English
Automatic Jest Snapshot Testing with Storybook Stories. ... Simply create a test file that can be picked up by Jest and run the...
Read more >
React Native Storybook + Generating individual test files to ...
The problem here is that any change to a component will trigger the jest watcher to re-run all the storyshot tests which can...
Read more >
How to Test a Full React App Using Nothing But Storybook
Part 1 (you're reading it!): Testing theory, what changed in the world, and how to use storybook to cover your bases with Storyshots,...
Read more >
Newest 'storyshots' Questions - Stack Overflow
When I try to run tests for storyshots with native screens enabled for ... I would like to save all snapshot files in...
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