Skip to content

Conversation

@rubencarvalho
Copy link
Contributor

@rubencarvalho rubencarvalho commented Nov 28, 2025

Description

Corrected the location and application of the @web/test-runner-coverage-v8 patch to properly handle code coverage for files outside the test runner's root directory.

Motivation and context

The patch file was previously created in the wrong location (patches/) and with incorrect formatting, so it was never actually being applied by Yarn. This meant coverage generation was still failing for cross-workspace imports.

This PR corrects the patch location and application method to follow Yarn Berry's patch system properly (expects patches in .yarn/patches/, not patches/).

This prevented coverage reports from being generated correctly and caused test failures in CI when coverage was enabled.

Related issue(s)

  • fixes [Issue Number]

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Check if the testing coverage CI actions in this PR runs correctly, without errors like this:
Error while generating code coverage for https://*****host:8000/__wds-outside-root__/1/2nd-gen/packages/core/dist/shared/base/index.js.
Error: ENOENT: no such file or directory, open '/root/project/1st-gen/__wds-outside-root__/1/2nd-gen/packages/core/dist/shared/base/index.js'
    at async open (node:internal/fs/promises:633:25)
    at async readFile (node:internal/fs/promises:1237:14)
    at async v8ToIstanbul (/root/project/node_modules/@web/test-runner-coverage-v8/dist/index.js:79:46)
    at async PlaywrightLauncherPage.stopSession (/root/project/node_modules/@web/test-runner-playwright/dist/PlaywrightLauncherPage.js:30:15)
    at async PlaywrightLauncher.stopSession (/root/project/node_modules/@web/test-runner-playwright/dist/PlaywrightLauncher.js:83:24) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/root/project/1st-gen/__wds-outside-root__/1/2nd-gen/packages/core/dist/shared/base/index.js'
}

@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2025

⚠️ No Changeset found

Latest commit: ad03c35

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

📚 Branch Preview Links

🔍 First Generation Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5912

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@rubencarvalho rubencarvalho marked this pull request as ready for review November 28, 2025 13:27
@rubencarvalho rubencarvalho requested a review from a team as a code owner November 28, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants