Open
Description
openedon Dec 4, 2023
Describe the bug
Coverage is not reported for files where JSX is used.
I've set up a minimal repository that recreates the issue with the same config - https://github.com/jMalojlo/sb-repro.
It's a basic button component with a story containing a play function to 'test' a click handler.
The component itself contains some JSX and imports some jsx and non-jsx module. What we see in the coverage report is that only the files without JSX are properly counted.
We're running an ejected CRA and I assume it's a Babel config issue, but can't figure this out myself.
Steps to reproduce the behavior
- Clone https://github.com/jMalojlo/sb-repro
npm install
&&npx playwright install chrome
npm run storybook
npm run storybook-test
runs tests with--coverage
npm run generate-storybook-coverage
nyc report with lcovopen ./coverage/storybook/lcov-report/index.html
to inspect the coverage HTML file
Environment
- Node.js version: 20.9.0
- NPM version: 10.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment