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:
git clone git@github.com:aquicore/chromatic-demo.git
- Open the terminal and
cd chromatic-demo
npm install
npm run storybook
- (You may need to
npx install playwright
- (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

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.
Describe the bug
I'm using a pretty much vanilla
create-react-appwith 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:
git clone git@github.com:aquicore/chromatic-demo.gitcd chromatic-demonpm installnpm run storybooknpx install playwrightnpm run storybook-coverageExpected 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
Environment
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-viteas the framework, but@storybook/react-webpack5didn't appear to do anything either.