Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the coverage.reporters option to the rstest configuration, allowing users to customize coverage reporting output. The change updates the default reporters to include text, html, clover, and json formats and enables passing reporter-specific options.
- Added
coverage.reportersconfiguration option with support for reporter-specific options - Updated coverage provider to use configurable reporters instead of hardcoded ones
- Enhanced test coverage to verify both default and custom reporter configurations
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/coverage-istanbul/src/provider.ts | Updated to accept and use configurable reporters with options support |
| packages/core/src/types/coverage.ts | Added type definitions for reporters configuration and normalized options |
| packages/core/src/index.ts | Exported new NormalizedCoverageOptions type |
| packages/core/src/core/runTests.ts | Added logging for coverage provider information |
| packages/core/src/config.ts | Added default reporters configuration and normalization logic |
| packages/core/package.json | Added istanbul-reports type definitions dependency |
| e2e/test-coverage/index.test.ts | Enhanced tests to verify reporter functionality and custom options |
| e2e/test-coverage/fixtures/test/string.test.ts | Reduced test coverage to create uncovered code for testing |
| e2e/test-coverage/fixtures/rstest.skipFull.config.ts | Added test configuration for custom reporter options |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/core/src/types/coverage.ts:1
- The CoverageProvider constructor signature is inconsistent with the actual implementation which expects NormalizedCoverageOptions. Update the type to match the implementation:
constructor(options: NormalizedCoverageOptions);
import type { ReportOptions } from 'istanbul-reports';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
support
coverage.reportersoption & update default value to['text', 'html', 'clover', 'json']Related Links
Checklist