File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed
packages/plugin-coverage/src/lib/nx Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -175,20 +175,20 @@ function ensureHasCoverageConfig(
175175 projectName : string ,
176176 target : string ,
177177) : VitestCoverageConfig {
178- return vitestConfig . test ?. coverage
179- ? vitestConfig
180- : ( ( ) => {
181- return {
182- ... vitestConfig ,
183- test : {
184- ... vitestConfig . test ,
185- coverage : {
186- reporter : [ 'text' , 'lcov' ] ,
187- reportsDirectory : `../../coverage/ ${ projectName } / ${ target . replace ( '-test ', '-tests' ) } ` ,
188- } ,
189- } ,
190- } ;
191- } ) ( ) ;
178+ if ( vitestConfig . test ?. coverage ) {
179+ return vitestConfig ;
180+ }
181+
182+ return {
183+ ... vitestConfig ,
184+ test : {
185+ ... vitestConfig . test ,
186+ coverage : {
187+ reporter : [ 'text ', 'lcov' ] ,
188+ reportsDirectory : `../../coverage/ ${ projectName } / ${ target . replace ( '-test' , '-tests' ) } ` ,
189+ } ,
190+ } ,
191+ } ;
192192}
193193
194194function buildCoverageResult ( {
@@ -287,8 +287,6 @@ function addDefaultCoverageIfMissing(
287287 typedConfig . test ?. coverage && typeof typedConfig . test . coverage === 'object' ;
288288
289289 if ( ! hasCoverage ) {
290- // Only warn for projects that actually need coverage but don't have it
291- // Most projects use shared configs which have coverage, so suppress warnings
292290 return {
293291 ...typedConfig ,
294292 test : {
You can’t perform that action at this time.
0 commit comments