File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -483,11 +483,14 @@ class TestCoverage {
483483 } = this . options ;
484484
485485 // This check filters out files that match the exclude globs.
486+ // dot:true is only applied to relativePath so user-supplied globs match
487+ // dotfiles within the project, without misinterpreting dot segments in the
488+ // absolute filesystem path (e.g. test tmp dirs like `test/.tmp.0`).
486489 if ( excludeGlobs ?. length > 0 ) {
487490 for ( let i = 0 ; i < excludeGlobs . length ; ++ i ) {
488491 if (
489492 matchCoverageGlob ( relativePath , excludeGlobs [ i ] ) ||
490- matchCoverageGlob ( absolutePath , excludeGlobs [ i ] )
493+ matchGlobPattern ( absolutePath , excludeGlobs [ i ] )
491494 ) return true ;
492495 }
493496 }
@@ -497,7 +500,7 @@ class TestCoverage {
497500 for ( let i = 0 ; i < includeGlobs . length ; ++ i ) {
498501 if (
499502 matchCoverageGlob ( relativePath , includeGlobs [ i ] ) ||
500- matchCoverageGlob ( absolutePath , includeGlobs [ i ] )
503+ matchGlobPattern ( absolutePath , includeGlobs [ i ] )
501504 ) return false ;
502505 }
503506 return true ;
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ async function setupFixtures() {
1818
1919function assertDefaultExclusions ( stdout ) {
2020 assert . match ( stdout , / # s t a r t o f c o v e r a g e r e p o r t / ) ;
21- assert . match ( stdout , / # l o g i c - f i l e \. j s \s + \| / ) ;
2221 assert . doesNotMatch ( stdout , / # f i l e - t e s t \. j s \s + \| / ) ;
2322 assert . doesNotMatch ( stdout , / # f i l e \. t e s t \. m j s \s + \| / ) ;
2423 assert . doesNotMatch ( stdout , / # f i l e \. t e s t \. t s \s + \| / ) ;
You can’t perform that action at this time.
0 commit comments