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.
Would love to have this feature. Storyshots can get rather slow to run as the project grows. Should ideally be able to run only the changed components' tests
It's really slow in big projects.
How to do this?
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 鉃曗灂
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. 馃檹
Anyone have a solution for this, I just want to run only a single test, do we have any configuration for this.
@akhilaravind a solution for this would be to use an external e2e testing tool like cypress and automate it to run visual screenshot testing against each storybook page
@hexadeciman thanks for the suggestion, I decided to move with jest and enzyme.
鉃曗灂 to this feature request. We would like to be able to run storyshot tests for an individual component (ideally alongside the component's unit tests in watch mode). Our storyshot suite has gotten really big and takes a long time to run.
Most helpful comment
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 鉃曗灂