-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report - Coverage Generation Issue with @storybook/test-runner #332
Comments
Hey @aimad-majdou thank you so much for all the info! Would it be possible to share a reproduction repo? That would make things much easier to investigate! thanks! |
I'm having the same problem. The tests run and then no table for coverage and no folder generated. https://github.com/truburn/chonky-dragon |
This comment was marked as resolved.
This comment was marked as resolved.
Hey there! Thank you so much for opening this issue, and everyone for the repro and additional info! I released v0.12.0 which should contain a fix, please try it out and let me know <3 |
0.12 works for us nicely - the coverage report is generated and also is visible in the console output. Thanks! |
Describe the bug
I encountered an issue while attempting to generate coverage using @storybook/addon-coverage in the Storybook test runner. Following the documentation, I installed the necessary package and registered it in my .storybook/main.js file. However, when I ran yarn test-storybook --coverage, the coverage folder was not generated, and the coverage table did not appear in the console.
To Reproduce
npm run storybook
to start Storybook.npm run test-storybook --coverage
in a separate terminal.Actual behavior
The coverage folder was not generated, and no coverage table was displayed in the console. There were no error messages or warnings related to coverage during the process.
Expected behavior
I expected the test runner to generate the coverage folder and display the coverage table in the console, as indicated in the documentation
Screenshots

System
Environment Info:
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Binaries:
Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.79)
npmPackages:
@storybook/addon-coverage: 0.0.8 => 0.0.8
@storybook/addon-essentials: 7.0.27 => 7.0.27
@storybook/addon-interactions: 7.0.27 => 7.0.27
@storybook/addon-links: 7.0.27 => 7.0.27
@storybook/blocks: 7.0.27 => 7.0.27
@storybook/react: 7.0.27 => 7.0.27
@storybook/react-vite: 7.0.27 => 7.0.27
@storybook/test-runner: 0.11.0 => 0.11.0
@storybook/testing-library: 0.0.14-next.2 => 0.0.14-next.2
Additional context
main.ts
file:vite.config.ts
file:package.json
:The text was updated successfully, but these errors were encountered: