This commit is contained in:
nuno maduro
2026-04-20 13:16:59 -07:00
parent adc5aae6f8
commit 0d99c33c4e
3 changed files with 187 additions and 12 deletions

View File

@ -88,6 +88,12 @@ final class Coverage
throw ShouldNotHappen::fromMessage(sprintf('Coverage not found in path: %s.', $reportPath));
}
// If TIA's marker is present, this run executed only the affected
// tests. Merge their fresh coverage slice into the cached full-run
// snapshot (stored by the previous `--tia --coverage` pass) so the
// report reflects the entire suite, not just what re-ran.
\Pest\Plugins\Tia\CoverageMerger::applyIfMarked($reportPath);
/** @var CodeCoverage $codeCoverage */
$codeCoverage = require $reportPath;
unlink($reportPath);