storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.68k stars 9.32k forks source link

Improve test progress denominator in Testing Module #29541

Open JReinhold opened 1 week ago

JReinhold commented 1 week ago

The current progress indicator in the Testing Module uses Vitest’s completion status X / Y, where the denominator steadily increases as the test run completes. Vitest has to do it this way because it cannot statically analyze all the test files.

But CSF is statically analyzable and Storybook knows exactly how many tests are going to be run. So we should be able to provide an accurate numerator for the run.

This should both work when testing all stories, and with focused tests, and we need to be mindful of the 'test' tag on stories.