File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
packages/angular_devkit/build_angular/src/webpack/utils
tests/legacy-cli/e2e/tests/test Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ export function getInstrumentationExcludedPaths(
126126
127127 for ( const excludeGlob of excludedPaths ) {
128128 glob
129- . sync ( path . join ( sourceRoot , excludeGlob ) , { nodir : true } )
130- . forEach ( ( p ) => excluded . add ( path . normalize ( p ) ) ) ;
129+ . sync ( excludeGlob , { nodir : true , cwd : sourceRoot } )
130+ . forEach ( ( p ) => excluded . add ( path . join ( sourceRoot , p ) ) ) ;
131131 }
132132
133133 return excluded ;
Original file line number Diff line number Diff line change 1+ import { expectFileToExist , rimraf } from '../../utils/fs' ;
2+ import { silentNg } from '../../utils/process' ;
3+ import { expectToFail } from '../../utils/utils' ;
4+
5+ export default async function ( ) {
6+ // This test is already in build-angular, but that doesn't run on Windows.
7+ await silentNg ( 'test' , '--no-watch' , '--code-coverage' ) ;
8+ await expectFileToExist ( 'coverage/test-project/app.component.ts.html' ) ;
9+ // Delete coverage directory
10+ await rimraf ( 'coverage' ) ;
11+
12+ await silentNg (
13+ 'test' ,
14+ '--no-watch' ,
15+ '--code-coverage' ,
16+ `--code-coverage-exclude='src/**/app.component.ts'` ,
17+ ) ;
18+
19+ // Doesn't include excluded.
20+ await expectFileToExist ( 'coverage/test-project/index.html' ) ;
21+ await expectToFail ( ( ) => expectFileToExist ( 'coverage/test-project/app.component.ts.html' ) ) ;
22+ }
You can’t perform that action at this time.
0 commit comments