Skip to content
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]: Storybook code coverage should ignore storybook-static #30525

Open
shilman opened this issue Feb 12, 2025 · 1 comment · May be fixed by #30639
Open

[Bug]: Storybook code coverage should ignore storybook-static #30525

shilman opened this issue Feb 12, 2025 · 1 comment · May be fixed by #30639

Comments

@shilman
Copy link
Member

shilman commented Feb 12, 2025

Describe the bug

Storybok Test supports code coverage out of the box.

However, unless the user configures otherwise, it includes storybook-static in its coverage calculation. Since none of that code is tested, this makes the coverage results artificially low.

Since it's quite common to build a static storybook for any variety of reasons (including running the Visual test addon) we should exclude storybook-static from coverage out of the box if possible.

Reproduction link

N/A

Reproduction steps

  1. Run coverage in Storybook Test
  2. Build your storybook storybook build
  3. Run coverage in Storybook Test & observe dramatically reduced coverage

System

any

Additional context

No response

@A-Mundanilkunathil
Copy link

I'm working on this!

kpowkitty added a commit to kpowkitty/storybook that referenced this issue Feb 24, 2025
kpowkitty added a commit to kpowkitty/storybook that referenced this issue Feb 24, 2025
@kpowkitty kpowkitty linked a pull request Feb 24, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants