File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
packages/schematics/angular/migrations/update-6 Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,16 @@ function extractProjectsConfig(
472472
473473 if ( app . testTsconfig ) {
474474 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+
476485 testOptions . scripts = ( app . scripts || [ ] ) . map ( _extraEntryMapper ) ;
477486 testOptions . styles = ( app . styles || [ ] ) . map ( _extraEntryMapper ) ;
478487 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', () => {
9393 karma : {
9494 config : './karma.conf.js' ,
9595 } ,
96+ codeCoverage : {
97+ exclude : [
98+ './excluded.spec.ts' ,
99+ ] ,
100+ } ,
96101 } ,
97102 defaults : {
98103 styleExt : 'css' ,
@@ -657,6 +662,7 @@ describe('Migration to v6', () => {
657662 expect ( test . options . polyfills ) . toEqual ( 'src/polyfills.ts' ) ;
658663 expect ( test . options . tsConfig ) . toEqual ( 'src/tsconfig.spec.json' ) ;
659664 expect ( test . options . karmaConfig ) . toEqual ( './karma.conf.js' ) ;
665+ expect ( test . options . codeCoverageExclude ) . toEqual ( [ './excluded.spec.ts' ] ) ;
660666 expect ( test . options . scripts ) . toEqual ( [ ] ) ;
661667 expect ( test . options . styles ) . toEqual ( [ 'src/styles.css' ] ) ;
662668 expect ( test . options . assets ) . toEqual ( [
You can’t perform that action at this time.
0 commit comments