You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running test-storybook --coverage,
those stories failed with:
[Test runner] An error occurred when evaluating code coverage:
The code in this story is not instrumented, which means the coverage setup is likely not correct.
More info: https://github.com/storybookjs/test-runner#setting-up-code-coverage
Old, but the way I got around this was to use --excludeTags (or --includeTags) and add tags to what is not covered. The tests will skip (this was fine in our case), but to get around that you could do a separate run without the coverage flag on those tests and use --includeTags.
I agree it sucks though, it should still run the tests with a possible warning
Describe the bug
I have some stories I want to exclude from coverage.
So I have this config:
When running
test-storybook --coverage
,those stories failed with:
[Test runner] An error occurred when evaluating code coverage: The code in this story is not instrumented, which means the coverage setup is likely not correct. More info: https://github.com/storybookjs/test-runner#setting-up-code-coverage
Steps to reproduce the behavior
https://github.com/cyberuni/storybook-coverage-instrument-issue
pnpm i pnpm storybook pnpm test-storybook --coverage # another terminal
Expected behavior
Those stories should be excluded from the coverage and should not fail.
Screenshots and/or logs
Environment
Additional context
The text was updated successfully, but these errors were encountered: