-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vitest: Create "Component Coverage" per story file #28628
Comments
** Disclaimer** This information might be inaccurate, due to it being generated automatically
References/code/core/src/core-server/utils/summarizeIndex.test.ts
|
Completed. Except of the optional "(Optional) Save Coverage Data" requirement. |
Any docs on this or still too early? |
This was just an experimental spike. We haven't released any coverage addon (yet). We might have plans for the end of year or the beginning of next year, though. @shilman Can provide more information about an approx. release date. |
We need to implement a mechanism in Vitest to generate coverage reports for each story file. This task focuses on collecting coverage data for all affected files when a story file is executed, and outputting the data in a parseable format. This will serve as the foundation for integrating coverage data into the Storybook UI or server at a later stage.
Tasks:
Configure Vitest for Coverage Reporting:
Generate Coverage Reports:
Modify the Vitest configuration to generate coverage reports in a parseable format (e.g., JSON, LCOV).
Ensure the reports include detailed coverage information for all affected files related to the story file being tested.
(Optional) Save Coverage Data:
Implement a mechanism to save the generated coverage reports in a structured format in a predefined directory.
Ensure the saved data is organized and accessible for later use.
Documentation:
Document the process and configuration steps required to generate coverage reports with Vitest.
Provide examples of the generated coverage data format for reference.
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: