Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Sep 17, 2025

Summary

support enable coverage via --coverage.

$ npx rstest --coverage

----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files |     100 |      100 |     100 |     100 |
 index.ts |     100 |      100 |     100 |     100 |
----------|---------|----------|---------|---------|-------------------

Related Links

Checklist

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

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

netlify bot commented Sep 17, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit c21ac94
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68ca33aeedc8ae000844cea0
😎 Deploy Preview https://deploy-preview-568--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 enabling code coverage collection via the --coverage CLI flag, allowing users to quickly enable coverage without modifying configuration files.

  • Adds --coverage CLI option to enable code coverage collection
  • Updates documentation to reflect the new CLI option with usage examples
  • Adds test coverage for the new CLI functionality

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/src/cli/commands.ts Adds the --coverage CLI option definition
packages/core/src/cli/init.ts Implements CLI coverage option handling and config resolution
e2e/test-coverage/index.test.ts Adds test case for CLI coverage flag functionality
e2e/test-coverage/fixtures/rstest.enable.config.ts Creates dedicated config file for coverage-enabled tests
e2e/test-coverage/fixtures/rstest.config.ts Removes coverage config to isolate CLI testing
website/docs/zh/guide/start/features.mdx Adds Chinese documentation for code coverage feature
website/docs/zh/guide/basic/cli.mdx Documents --coverage CLI option in Chinese
website/docs/zh/config/test/coverage.mdx Updates Chinese coverage documentation with CLI examples
website/docs/en/guide/start/features.mdx Adds English documentation for code coverage feature
website/docs/en/guide/basic/cli.mdx Documents --coverage CLI option in English
website/docs/en/config/test/coverage.mdx Updates English coverage documentation with CLI examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@9aoy 9aoy merged commit 939559d into main Sep 17, 2025
17 checks passed
@9aoy 9aoy deleted the enable-coverage branch September 17, 2025 05:35
@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