Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): fallback to use projectRoot when …
Browse files Browse the repository at this point in the history
…sourceRoot is missing during coverage

With this change we fallback to use the projectRoot when the sourceRoot is missing for files to be included in coverage.

Closes: #23591
(cherry picked from commit d8cfe8b)
  • Loading branch information
alan-agius4 authored and clydin committed Jul 18, 2022
1 parent c2201c8 commit 5810c2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ export async function getCommonConfig(wco: WebpackConfigOptions): Promise<Config
supportedBrowsers: buildOptions.supportedBrowsers,
instrumentCode: codeCoverage
? {
includedBasePath: sourceRoot,
includedBasePath: sourceRoot ?? projectRoot,
excludedPaths: getInstrumentationExcludedPaths(root, codeCoverageExclude),
}
: undefined,
Expand Down

0 comments on commit 5810c2c

Please sign in to comment.