Skip to content

feat: support coverage.allowExternal option#1050

Merged
9aoy merged 3 commits intomainfrom
coverage-external
Mar 16, 2026
Merged

feat: support coverage.allowExternal option#1050
9aoy merged 3 commits intomainfrom
coverage-external

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Mar 12, 2026

Summary

Added coverage.allowExternal option to control whether coverage is collected for files outside the project root directory.

Current behavior: Rstest instruments all files processed during bundling, including files outside the project root (e.g., sibling workspace packages in a monorepo), resulting in noisy coverage reports.

New behavior: By default (allowExternal: false), files outside the project root are excluded from coverage reports, aligning with Jest and Vitest conventions. Users can opt in with allowExternal: true for monorepo cross-package coverage.

allowExternal coverage.include External files in report?
false (default) not set No
false (default) set No
true not set Yes
true set (matching external paths) Yes (if matched)

Related Links

close #1045

Checklist

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

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 12, 2026

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: f64675c
Status: ✅  Deploy successful!
Preview URL: https://331f5fc8.rstest.pages.dev
Branch Preview URL: https://coverage-external.rstest.pages.dev

View logs

@9aoy 9aoy requested a review from fi3ework March 13, 2026 03:05
@9aoy 9aoy merged commit 313d546 into main Mar 16, 2026
11 checks passed
@9aoy 9aoy deleted the coverage-external branch March 16, 2026 06:43
@9aoy 9aoy mentioned this pull request Mar 18, 2026
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.

[Feature]: Supports control whether to collect external file coverage

2 participants