File tree 2 files changed +16
-1
lines changed
packages/schematics/angular/migrations/update-6
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,16 @@ function extractProjectsConfig(
472
472
473
473
if ( app . testTsconfig ) {
474
474
testOptions . tsConfig = appRoot + '/' + app . testTsconfig ;
475
- }
475
+ }
476
+
477
+ const codeCoverageExclude = config . test
478
+ && config . test . codeCoverage
479
+ && config . test . codeCoverage . exclude ;
480
+
481
+ if ( codeCoverageExclude ) {
482
+ testOptions . codeCoverageExclude = codeCoverageExclude ;
483
+ }
484
+
476
485
testOptions . scripts = ( app . scripts || [ ] ) . map ( _extraEntryMapper ) ;
477
486
testOptions . styles = ( app . styles || [ ] ) . map ( _extraEntryMapper ) ;
478
487
testOptions . assets = ( app . assets || [ ] ) . map ( _mapAssets ) . filter ( x => ! ! x ) ;
Original file line number Diff line number Diff line change @@ -93,6 +93,11 @@ describe('Migration to v6', () => {
93
93
karma : {
94
94
config : './karma.conf.js' ,
95
95
} ,
96
+ codeCoverage : {
97
+ exclude : [
98
+ './excluded.spec.ts' ,
99
+ ] ,
100
+ } ,
96
101
} ,
97
102
defaults : {
98
103
styleExt : 'css' ,
@@ -657,6 +662,7 @@ describe('Migration to v6', () => {
657
662
expect ( test . options . polyfills ) . toEqual ( 'src/polyfills.ts' ) ;
658
663
expect ( test . options . tsConfig ) . toEqual ( 'src/tsconfig.spec.json' ) ;
659
664
expect ( test . options . karmaConfig ) . toEqual ( './karma.conf.js' ) ;
665
+ expect ( test . options . codeCoverageExclude ) . toEqual ( [ './excluded.spec.ts' ] ) ;
660
666
expect ( test . options . scripts ) . toEqual ( [ ] ) ;
661
667
expect ( test . options . styles ) . toEqual ( [ 'src/styles.css' ] ) ;
662
668
expect ( test . options . assets ) . toEqual ( [
You can’t perform that action at this time.
0 commit comments