You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when looking at only the unit test report, I can see that these lines are being hitted.
It seems that the storybook addon and vitest generate slightly different line and column for the statements.
For example in one component vitest said that there is a stmt on line 38 start at col 18 and ends on the same line.
That I can somehow define how code is instrumented or which version of Istanbul is used. So I can merge reports from multiple testing tools.
Environment
OS: Ubuntu
Node.js version: v16.20.0
NPM version: ^9
Additional context
Here are the current versions of my package.json
"vitest": "^0.29.8""@vitest/coverage-istanbul": "^0.34.5",
// looking at node_modules I can see that coverage-istanbul requires the following:"istanbul-lib-coverage": "^3.2.0",
"istanbul-lib-instrument": "^6.0.0",
"istanbul-lib-report": "^3.0.1",
"istanbul-lib-source-maps": "^4.0.1",
"istanbul-reports": "^3.1.5",
"@storybook/addon-coverage": "^1.0.0",
// looking at node_modules I can see:"istanbul-lib-instrument": "^6.0.1",
"vite-plugin-istanbul": "^3.0.1"// following vite-plugin-istanbul I can see that it uses:"istanbul-lib-instrument": "^5.1.0",
So now I am considering if the issue comes from different versions?
Describe the Issue
I want to merge cumulatively storybook coder coverage reports with reports from vitest.
This one was generated using vitest coverage-final.json
This one was generated using the storybook addon coverage-storybook.json
Here are my configs for vitest
For storybook I used:
At the end I use
nyc
to merge the output files:In my merged coverage report I can then see:
However, when looking at only the unit test report, I can see that these lines are being hitted.
It seems that the storybook addon and vitest generate slightly different line and column for the statements.
For example in one component vitest said that there is a stmt on line 38 start at col 18 and ends on the same line.
However, storybook coverage report says the statement is on line 38 in column 2:
Steps to reproduce the behavior
Expected behavior
That I can somehow define how code is instrumented or which version of Istanbul is used. So I can merge reports from multiple testing tools.
Environment
Additional context
Here are the current versions of my package.json
So now I am considering if the issue comes from different versions?
I also posted here about it:
storybookjs/storybook#25667
and commented here:
istanbuljs/nyc#1302
The text was updated successfully, but these errors were encountered: