Comments (4)
I figured out what was wrong and fixed the issue on my side. It was because of .nycrc file. It basically told the tests to look for coverage in all the .ts files, but the problem was that my components library wasn't imported in storybook with the ts files, we actually build the library into a package and imported that in storybook. It was imported in preview.js as a js file. Removing .nycrc made all the components appear in the test coverage report
from test-runner.
Hi @vstanciu47
Thank you for reporting the issue.
I have prepared a canary release for Storybook, which might fix the issue. Could you please try it out?
npx [email protected] upgrade
Also please install the following version for @storybook/addon-coverage
: 1.0.4--canary.42.041aa23.0
from test-runner.
npx [email protected] upgrade
Thanks for your reply. Unfortunately the fix is not working for me. What has change is that now story files are included in the coverage report, but I don't think that is necessary. Components files are still not included in the report.
Card report before canary release
Card report with canary release
I also tried a fresh install of storybook with a new repository and the components are still not included in the coverage report.
from test-runner.
Could you provide this sample repository?
from test-runner.
Related Issues (20)
- Remove filterered stories from test HOT 2
- [bug] Test runner crashes with a11y tests on Storybook 8 HOT 2
- [bug] should not require main.js on standalone remote mode HOT 1
- [bug] getStoryContext() does not include all the story tags as defined in the index.json file HOT 3
- [bug] Handle new tags structure
- [bug] Start storybook when using the `test-runner` HOT 2
- [Bug]: running `nyc` in `reportCoverage()` fails on Windows with factory file associations settings HOT 6
- [Bug]: Playwright version needed changes without dependency versions having changed HOT 5
- [Bug]: Can't rely on isTestRunner check when preconfiguring viewport size
- [Bug]: Include/Exclude tags dont behave as expected HOT 4
- [Feature request]: Test stoybook behind basic auth
- [Bug]: Storybook 8.1.4 updated stories index to v5, which is unsupported
- [Bug]: Globals variable not properly defined
- [Bug]: How do I get chrome browser logs working?
- [Feature request]: Add `logLevel` to cli options
- [Bug]: Ejecting adds `require` of file that does not exist HOT 2
- [Bug]: how to debug test runner network issues HOT 1
- [Feature request]: Respect dangerouslyIgnoreUnhandledErrors HOT 3
- [Bug]: --includeTags missing some tests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-runner.