Skip to content

Add reporters config and more documentation#18

Merged
NullVoxPopuli merged 2 commits into
NullVoxPopuli:mainfrom
LucasHillDex:lh/add_reporters_config_and_more_documentation
Mar 20, 2026
Merged

Add reporters config and more documentation#18
NullVoxPopuli merged 2 commits into
NullVoxPopuli:mainfrom
LucasHillDex:lh/add_reporters_config_and_more_documentation

Conversation

@LucasHillDex
Copy link
Copy Markdown
Contributor

Summary

This PR adds configurable built-in coverage reporters to the Testem middleware and updates the docs around coverage setup.

What changed

Added a new reporters middleware option so consumers can choose which Istanbul-native reporters to generate.
Kept existing behavior as the default when reporters is not provided.
Preserved compatibility for the text summary file in the default path, and when the text reporter is explicitly requested.
Added validation for the new config so invalid reporter values fail clearly.
Added integration coverage for a custom reporter configuration using json-summary and lcov.
Expanded the README to document:
the new reporters option
how reporter selection works
the requirement to enable build.sourcemap: true in Vite so coverage maps back to source correctly
the need to set distDir when the Vite build output is not dist

Why
This makes coverage output configurable without needing custom post-processing for standard Istanbul report formats, while keeping the current default experience unchanged for existing users.

@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label Mar 20, 2026
Copy link
Copy Markdown
Owner

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tyty

@NullVoxPopuli NullVoxPopuli merged commit 0066846 into NullVoxPopuli:main Mar 20, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants