Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Sep 11, 2025

Summary

support coverage.reporters option & update default value to ['text', 'html', 'clover', 'json']

image
import { defineConfig } from '@rstest/core';

export default defineConfig({
  coverage: {
    enabled: true,
    provider: 'istanbul',
    reporters: [['text', { skipFull: true }]],
  },
});

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings September 11, 2025 06:19
@netlify
Copy link

netlify bot commented Sep 11, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit c504779
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68c26a8992fe2d0007151a26
😎 Deploy Preview https://deploy-preview-556--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.reporters configuration 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.

@9aoy 9aoy merged commit 56e9bde into main Sep 11, 2025
16 checks passed
@9aoy 9aoy deleted the coverage-reporters branch September 11, 2025 06:27
@9aoy 9aoy mentioned this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant