Skip to content

fix(jest): scope coverage output per-project in multi-project workspaces (fixes #1009)#2212

Open
just-jeb wants to merge 1 commit intomasterfrom
fix/1009-coverage-namespacing
Open

fix(jest): scope coverage output per-project in multi-project workspaces (fixes #1009)#2212
just-jeb wants to merge 1 commit intomasterfrom
fix/1009-coverage-namespacing

Conversation

@just-jeb
Copy link
Copy Markdown
Owner

@just-jeb just-jeb commented May 7, 2026

Summary

Fixes #1009 — Coverage output files were being overwritten in multi-project workspaces because all projects wrote to the same coverage directory.

Root Cause

The Jest builder was not scoping the coverageDirectory per project. When multiple projects ran in sequence, each project would write coverage to the same directory, causing overwriting.

Solution

When config.projects exists and is an array (multi-project workspace), the builder now:

  1. Iterates each project
  2. Scopes the coverageDirectory to ${originalCoverageDir}/${projectName}
  3. Returns an array of scoped configs instead of a single global config

This generalizes to all project-scoped Jest output (not just coverage), as intended.

Testing

  • Added failing integration test that reproduces the issue
  • Fix makes all 35 Jest tests pass
  • No regressions detected

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.

Support for coverage in multi-project workspaces

1 participant