fix(@angular/build): resolve coverage overrides paths relative to workspace root by maruthang · Pull Request #32926 · angular/angular-cli

@maruthang

…kspace root

karma-coverage normalises coverage-map keys using the karma `basePath`, which
the builder sets to the temporary build output directory. As a result, override
patterns written relative to the workspace root (e.g. `src/app/app.ts`) were
never matched and the overrides were silently ignored.

Fix: after parsing the karma config, rewrite the keys of
`coverageReporter.check.global.overrides` and
`coverageReporter.check.each.overrides` so they are expressed as paths relative
to `basePath` (the temp output path), matching how karma-coverage itself
normalises the keys in the coverage map.

Closes angular#30956