File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable @nx/enforce-module-boundaries */
2+ import { createProjectGraphAsync } from '@nx/devkit' ;
23import type {
34 CategoryConfig ,
45 CoreConfig ,
@@ -93,10 +94,15 @@ export async function configureCoveragePlugin(
9394 const config : CoveragePluginConfig = projectName
9495 ? // We do not need to run a coverageToolCommand. This is handled over the Nx task graph.
9596 {
96- reports : targets . map ( target => ( {
97- pathToProject : `packages/${ projectName } ` ,
98- resultsPath : `coverage/${ projectName } /${ target } s/lcov.info` ,
99- } ) ) ,
97+ reports : Object . keys (
98+ ( await createProjectGraphAsync ( ) ) . nodes [ projectName ] ?. data . targets ??
99+ { } ,
100+ )
101+ . filter ( target => targets . includes ( target ) )
102+ . map ( target => ( {
103+ pathToProject : `packages/${ projectName } ` ,
104+ resultsPath : `coverage/${ projectName } /${ target } s/lcov.info` ,
105+ } ) ) ,
100106 }
101107 : {
102108 reports : await getNxCoveragePaths ( targets ) ,
You can’t perform that action at this time.
0 commit comments