Skip to content

Commit

Permalink
fix(@angular/build): ensure matching coverage excludes with karma on …
Browse files Browse the repository at this point in the history
…Windows

When on Windows, the coverage exclusion paths need to be made
absolute via the Node.js path builtin to ensure matching
with the files during the build process.
  • Loading branch information
clydin authored and alan-agius4 committed Mar 3, 2025
1 parent c39c344 commit c8c7318
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ function getInstrumentationExcludedPaths(root: string, excludedPaths: string[]):

for (const excludeGlob of excludedPaths) {
const excludePath = excludeGlob[0] === '/' ? excludeGlob.slice(1) : excludeGlob;
globSync(excludePath, { absolute: true, cwd: root }).forEach((p) => excluded.add(p));
globSync(excludePath, { cwd: root }).forEach((p) => excluded.add(path.join(root, p)));
}

return excluded;
Expand Down

0 comments on commit c8c7318

Please sign in to comment.