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
Vitest and storybook should use the same source map outputted, thus the issue with different columns for the same stmt not affecting merged report
Observed Behavior
I am trying to generate a merged code report. Therefore, I am using for my unit tests vitest with istanbul. For Storybook I am using the addon which also uses istanbul. To merge the reports I am using nyc.
The issue I am having is that the reports of vitest and storybook are showing me different columns for the same stmt. This leads to not correct merging.
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.
Tried to upgrade packages to "@storybook/addon-coverage" to v 1.0.1 and "@storybook/test-runner" to v 0.17.0 but it doesn't resolve the issue
Tried manually enabling source map for storybook and vitest and adding nyc configuration (installing "@istanbuljs/nyc-config-typescript" and adding .nycrc file for more control), but it didn't work as well
Tried with storybook v8 and storybook the dependancies updated but it doesn't solve the issue as well
Tried using istanbul-merge instead of nyc for merging the reports, but in the end it basically ends up with the same output as using nyc
There are 3 different versions of istanbul-lib-instrument in use after running npm list istanbul-lib-instrument, it should be the cause of the problem.
Link to bug demonstration repository https://github.com/meanstackmax/demo-test-coverage/tree/main
Expected Behavior
Vitest and storybook should use the same source map outputted, thus the issue with different columns for the same stmt not affecting merged report
Observed Behavior
I am trying to generate a merged code report. Therefore, I am using for my unit tests vitest with istanbul. For Storybook I am using the addon which also uses istanbul. To merge the reports I am using nyc.
The issue I am having is that the reports of vitest and storybook are showing me different columns for the same stmt. This leads to not correct merging.
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:
Troubleshooting steps
-Tried to add this to package.json, but it didn't work:
Environment Information
The text was updated successfully, but these errors were encountered: