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] No Coverage is tracked #30

Open
ian-infogrid opened this issue Nov 10, 2023 · 2 comments
Open

[Bug] No Coverage is tracked #30

ian-infogrid opened this issue Nov 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ian-infogrid
Copy link

Describe the bug

I'm using a pretty much vanilla create-react-app with Storybook v7 initialised and I can't get code coverage to record anything at all.

Steps to reproduce the behavior

To make this easy, I've shared a small repository all stood up ready to go:

  1. git clone [email protected]:aquicore/chromatic-demo.git
  2. Open the terminal and cd chromatic-demo
  3. npm install
  4. npm run storybook
  5. (You may need to npx install playwright
  6. (Separate terminal) npm run storybook-coverage

Expected behavior

I would expect for the Button.jsx file to have a fairly high coverage reported in the terminal in in the output file.

Screenshots and/or logs

image

Environment

  • OS: Ubuntu 22.04.3
  • Node.js version: v18.13.0
  • NPM version: 8.19.3

Additional context

I've tried tweaking various things all over the place. The culprit I thought most likely was either something in react-app (I tried ejecting but it didn't do much with babel) or the fact I'm using @storybook/react-vite as the framework, but @storybook/react-webpack5 didn't appear to do anything either.

@ian-infogrid ian-infogrid added the bug Something isn't working label Nov 10, 2023
@designbyadrian
Copy link

Same issue with @storybook/test-runner 0.16.0 @storybook/addon-coverage 1.0.0 and other storybook addons at 7.6 or higher.

@kaidjohnson
Copy link

I think this issue is similar to #34.

See #34 (comment) for possible solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants