@@ -470,12 +470,12 @@ describe('Migration to v6', () => {
470
470
} ) ;
471
471
} ) ;
472
472
473
- describe ( 'architect ' , ( ) => {
473
+ describe ( 'targets ' , ( ) => {
474
474
it ( 'should exist' , ( ) => {
475
475
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
476
476
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
477
477
const config = getConfig ( tree ) ;
478
- expect ( config . architect ) . not . toBeDefined ( ) ;
478
+ expect ( config . targets ) . not . toBeDefined ( ) ;
479
479
} ) ;
480
480
} ) ;
481
481
@@ -527,7 +527,7 @@ describe('Migration to v6', () => {
527
527
it ( 'should set build target' , ( ) => {
528
528
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
529
529
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
530
- const build = getConfig ( tree ) . projects . foo . architect . build ;
530
+ const build = getConfig ( tree ) . projects . foo . targets . build ;
531
531
expect ( build . builder ) . toEqual ( '@angular-devkit/build-angular:browser' ) ;
532
532
expect ( build . options . scripts ) . toEqual ( [ ] ) ;
533
533
expect ( build . options . styles ) . toEqual ( [ 'src/styles.css' ] ) ;
@@ -561,7 +561,7 @@ describe('Migration to v6', () => {
561
561
it ( 'should not set baseHref on build & serve targets if not defined' , ( ) => {
562
562
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
563
563
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
564
- const build = getConfig ( tree ) . projects . foo . architect . build ;
564
+ const build = getConfig ( tree ) . projects . foo . targets . build ;
565
565
expect ( build . options . baseHref ) . toBeUndefined ( ) ;
566
566
} ) ;
567
567
@@ -570,7 +570,7 @@ describe('Migration to v6', () => {
570
570
config . apps [ 0 ] . baseHref = '/base/href/' ;
571
571
tree . create ( oldConfigPath , JSON . stringify ( config , null , 2 ) ) ;
572
572
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
573
- const build = getConfig ( tree ) . projects . foo . architect . build ;
573
+ const build = getConfig ( tree ) . projects . foo . targets . build ;
574
574
expect ( build . options . baseHref ) . toEqual ( '/base/href/' ) ;
575
575
} ) ;
576
576
@@ -579,9 +579,9 @@ describe('Migration to v6', () => {
579
579
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
580
580
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
581
581
const config = getConfig ( tree ) ;
582
- expect ( config . projects . foo . architect . build . options . serviceWorker ) . toBeUndefined ( ) ;
582
+ expect ( config . projects . foo . targets . build . options . serviceWorker ) . toBeUndefined ( ) ;
583
583
expect (
584
- config . projects . foo . architect . build . configurations . production . serviceWorker ,
584
+ config . projects . foo . targets . build . configurations . production . serviceWorker ,
585
585
) . toBe ( true ) ;
586
586
} ) ;
587
587
@@ -590,7 +590,7 @@ describe('Migration to v6', () => {
590
590
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
591
591
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
592
592
const config = getConfig ( tree ) ;
593
- expect ( config . projects . foo . architect . build . configurations ) . toEqual ( {
593
+ expect ( config . projects . foo . targets . build . configurations ) . toEqual ( {
594
594
production : {
595
595
optimization : true ,
596
596
outputHashing : 'all' ,
@@ -610,7 +610,7 @@ describe('Migration to v6', () => {
610
610
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
611
611
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
612
612
const config = getConfig ( tree ) ;
613
- expect ( config . projects . foo . architect . build . configurations ) . toEqual ( {
613
+ expect ( config . projects . foo . targets . build . configurations ) . toEqual ( {
614
614
prod : {
615
615
fileReplacements : [ {
616
616
replace : 'src/environments/environment.ts' ,
@@ -634,7 +634,7 @@ describe('Migration to v6', () => {
634
634
it ( 'should set the serve target' , ( ) => {
635
635
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
636
636
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
637
- const serve = getConfig ( tree ) . projects . foo . architect . serve ;
637
+ const serve = getConfig ( tree ) . projects . foo . targets . serve ;
638
638
expect ( serve . builder ) . toEqual ( '@angular-devkit/build-angular:dev-server' ) ;
639
639
expect ( serve . options ) . toEqual ( {
640
640
browserTarget : 'foo:build' ,
@@ -647,7 +647,7 @@ describe('Migration to v6', () => {
647
647
it ( 'should set the test target' , ( ) => {
648
648
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
649
649
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
650
- const test = getConfig ( tree ) . projects . foo . architect [ 'test' ] ;
650
+ const test = getConfig ( tree ) . projects . foo . targets [ 'test' ] ;
651
651
expect ( test . builder ) . toEqual ( '@angular-devkit/build-angular:karma' ) ;
652
652
expect ( test . options . main ) . toEqual ( 'src/test.ts' ) ;
653
653
expect ( test . options . polyfills ) . toEqual ( 'src/polyfills.ts' ) ;
@@ -666,7 +666,7 @@ describe('Migration to v6', () => {
666
666
it ( 'should set the extract i18n target' , ( ) => {
667
667
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
668
668
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
669
- const extract = getConfig ( tree ) . projects . foo . architect [ 'extract-i18n' ] ;
669
+ const extract = getConfig ( tree ) . projects . foo . targets [ 'extract-i18n' ] ;
670
670
expect ( extract . builder ) . toEqual ( '@angular-devkit/build-angular:extract-i18n' ) ;
671
671
expect ( extract . options ) . toBeDefined ( ) ;
672
672
expect ( extract . options . browserTarget ) . toEqual ( `foo:build` ) ;
@@ -675,7 +675,7 @@ describe('Migration to v6', () => {
675
675
it ( 'should set the lint target' , ( ) => {
676
676
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
677
677
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
678
- const tslint = getConfig ( tree ) . projects . foo . architect [ 'lint' ] ;
678
+ const tslint = getConfig ( tree ) . projects . foo . targets [ 'lint' ] ;
679
679
expect ( tslint . builder ) . toEqual ( '@angular-devkit/build-angular:tslint' ) ;
680
680
expect ( tslint . options ) . toBeDefined ( ) ;
681
681
expect ( tslint . options . tsConfig )
@@ -693,7 +693,7 @@ describe('Migration to v6', () => {
693
693
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
694
694
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
695
695
const config = getConfig ( tree ) ;
696
- const budgets = config . projects . foo . architect . build . configurations . production . budgets ;
696
+ const budgets = config . projects . foo . targets . build . configurations . production . budgets ;
697
697
expect ( budgets . length ) . toEqual ( 1 ) ;
698
698
expect ( budgets [ 0 ] . type ) . toEqual ( 'bundle' ) ;
699
699
expect ( budgets [ 0 ] . name ) . toEqual ( 'main' ) ;
@@ -708,7 +708,7 @@ describe('Migration to v6', () => {
708
708
const e2eProject = getConfig ( tree ) . projects [ 'foo-e2e' ] ;
709
709
expect ( e2eProject . root ) . toBe ( 'e2e' ) ;
710
710
expect ( e2eProject . sourceRoot ) . toBe ( 'e2e' ) ;
711
- const e2eOptions = e2eProject . architect . e2e ;
711
+ const e2eOptions = e2eProject . targets . e2e ;
712
712
expect ( e2eOptions . builder ) . toEqual ( '@angular-devkit/build-angular:protractor' ) ;
713
713
const options = e2eOptions . options ;
714
714
expect ( options . protractorConfig ) . toEqual ( './protractor.conf.js' ) ;
@@ -722,7 +722,7 @@ describe('Migration to v6', () => {
722
722
const e2eProject = getConfig ( tree ) . projects [ 'foo-e2e' ] ;
723
723
expect ( e2eProject . root ) . toBe ( 'apps/app1/e2e' ) ;
724
724
expect ( e2eProject . sourceRoot ) . toBe ( 'apps/app1/e2e' ) ;
725
- const e2eOptions = e2eProject . architect . e2e ;
725
+ const e2eOptions = e2eProject . targets . e2e ;
726
726
expect ( e2eOptions . builder ) . toEqual ( '@angular-devkit/build-angular:protractor' ) ;
727
727
const options = e2eOptions . options ;
728
728
expect ( options . protractorConfig ) . toEqual ( './protractor.conf.js' ) ;
@@ -732,7 +732,7 @@ describe('Migration to v6', () => {
732
732
it ( 'should set the lint target' , ( ) => {
733
733
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
734
734
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
735
- const tslint = getConfig ( tree ) . projects [ 'foo-e2e' ] . architect . lint ;
735
+ const tslint = getConfig ( tree ) . projects [ 'foo-e2e' ] . targets . lint ;
736
736
expect ( tslint . builder ) . toEqual ( '@angular-devkit/build-angular:tslint' ) ;
737
737
expect ( tslint . options ) . toBeDefined ( ) ;
738
738
expect ( tslint . options . tsConfig ) . toEqual ( [ 'e2e/tsconfig.e2e.json' ] ) ;
@@ -989,7 +989,7 @@ describe('Migration to v6', () => {
989
989
tree . create ( oldConfigPath , JSON . stringify ( baseConfig , null , 2 ) ) ;
990
990
tree = schematicRunner . runSchematic ( 'migration-01' , defaultOptions , tree ) ;
991
991
const config = getConfig ( tree ) ;
992
- const target = config . projects . foo . architect . server ;
992
+ const target = config . projects . foo . targets . server ;
993
993
expect ( target ) . toBeDefined ( ) ;
994
994
expect ( target . builder ) . toEqual ( '@angular-devkit/build-angular:server' ) ;
995
995
expect ( target . options . outputPath ) . toEqual ( 'dist/server' ) ;
0 commit comments