Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Sep 11, 2025

Summary

should exclude test files from coverage collection.

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 09:58
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 implements test file exclusion from coverage collection by adding configurable exclude patterns to the coverage options. The changes address a previously unimplemented TODO item to exclude test files from coverage collection.

  • Added an exclude option to the coverage configuration with default patterns for test files
  • Updated the coverage plugin to use the exclude patterns with the SWC coverage instrument
  • Modified test expectations to reflect the new coverage behavior without test files

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/core/src/types/coverage.ts Added exclude option type definition with documentation
packages/core/src/config.ts Added default exclude patterns for test files and directories
packages/coverage-istanbul/src/plugin.ts Updated plugin to accept options and pass exclude patterns to SWC
e2e/test-coverage/index.test.ts Updated test expectations to match new coverage behavior
e2e/projects/coverage.test.ts Updated test expectations for projects coverage

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

/**
* A list of glob patterns that should be excluded from coverage collection.
*
* @default ['**\/node_modules/**', '**\/dist/**', '**\/test/**', '**\/__tests__/**', '**\/*.{test,spec}.?(c|m)[jt]s?(x)', '**\/__mocks__/**']
Copy link

Copilot AI Sep 11, 2025

Choose a reason for hiding this comment

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

The JSDoc comment has incorrect escaping of forward slashes. The backslashes before forward slashes should be removed as they are not needed in JSDoc comments.

Copilot uses AI. Check for mistakes.
@netlify
Copy link

netlify bot commented Sep 11, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 2d82070
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68c3cad42196b300085e70bb
😎 Deploy Preview https://deploy-preview-559--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.

@9aoy 9aoy merged commit 4aed867 into main Sep 12, 2025
16 checks passed
@9aoy 9aoy deleted the coverage-exclude branch September 12, 2025 07:34
@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