@@ -8,7 +8,7 @@ import { getFileContent } from '@schematics/angular/utility/test';
88
99describe ( 'Add {N} schematic' , ( ) => {
1010 const schematicRunner = new SchematicTestRunner (
11- 'nativescript- schematics' ,
11+ '@ nativescript/ schematics' ,
1212 resolve ( __dirname , '../collection.json' ) ,
1313 ) ;
1414 const project = 'foo' ;
@@ -44,6 +44,7 @@ describe('Add {N} schematic', () => {
4444 it ( 'should add {N} specific files' , ( ) => {
4545 const files = appTree . files ;
4646
47+ expect ( files ) . toContain ( '/ngcc.config.js' ) ;
4748 expect ( files ) . toContain ( '/nsconfig.json' ) ;
4849 expect ( files ) . toContain ( '/tsconfig.tns.json' ) ;
4950 expect ( files ) . toContain ( '/src/app.css' ) ;
@@ -77,9 +78,9 @@ describe('Add {N} schematic', () => {
7778 const packageJson = JSON . parse ( getFileContent ( appTree , packageJsonPath ) ) ;
7879 const { dependencies, devDependencies } = packageJson ;
7980 expect ( dependencies ) . toBeDefined ( ) ;
80- expect ( dependencies [ 'nativescript- angular' ] ) . toBeDefined ( ) ;
81+ expect ( dependencies [ '@ nativescript/ angular' ] ) . toBeDefined ( ) ;
8182 expect ( dependencies [ '@nativescript/theme' ] ) . toBeDefined ( ) ;
82- expect ( dependencies [ 'tns- core-modules ' ] ) . toBeDefined ( ) ;
83+ expect ( dependencies [ '@nativescript/ core' ] ) . toBeDefined ( ) ;
8384 expect ( dependencies [ 'reflect-metadata' ] ) . toBeDefined ( ) ;
8485
8586 expect ( devDependencies [ 'nativescript-dev-webpack' ] ) . toBeDefined ( ) ;
@@ -94,8 +95,10 @@ describe('Add {N} schematic', () => {
9495 const packageJson = JSON . parse ( getFileContent ( appTree , packageJsonPath ) ) ;
9596 const { scripts } = packageJson ;
9697 expect ( scripts ) . toBeDefined ( ) ;
97- expect ( scripts . android ) . toEqual ( 'tns run android' ) ;
98- expect ( scripts . ios ) . toEqual ( 'tns run ios' ) ;
98+ expect ( scripts . android ) . toEqual ( 'tns run android --env.aot' ) ;
99+ expect ( scripts . ios ) . toEqual ( 'tns run ios --env.aot' ) ;
100+ expect ( scripts . ngcc ) . toEqual ( 'ngcc --properties es2015 module main --first-only' ) ;
101+ expect ( scripts . postinstall ) . toEqual ( 'npm run ngcc' ) ;
99102 } ) ;
100103
101104 it ( 'should add NativeScript key to the package json' , ( ) => {
0 commit comments