Closed valentinpalkovic closed 2 weeks ago
Disclaimer This information might be inaccurate, due to it being generated automatically
summarizeIndex
in /code/core/src/core-server/utils/summarizeIndex.test.ts
to include component coverage data.extractComponentDescription
in /code/renderers/svelte/src/docs/extractComponentDescription.test.ts
to extract component coverage information./code/lib/cli-storybook
and /code/lib/cli-sb
to support the new component coverage feature./code/core/src/core-server/utils/summarizeIndex.test.ts /code/renderers/svelte/src/docs/extractComponentDescription.test.ts /code/lib/cli-storybook /code/lib/cli-sb
Completed. Except of the optional "(Optional) Save Coverage Data" requirement.
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: