@@ -8,7 +8,7 @@ import { getFileContent } from '@schematics/angular/utility/test';
8
8
9
9
describe ( 'Add {N} schematic' , ( ) => {
10
10
const schematicRunner = new SchematicTestRunner (
11
- 'nativescript- schematics' ,
11
+ '@ nativescript/ schematics' ,
12
12
resolve ( __dirname , '../collection.json' ) ,
13
13
) ;
14
14
const project = 'foo' ;
@@ -44,6 +44,7 @@ describe('Add {N} schematic', () => {
44
44
it ( 'should add {N} specific files' , ( ) => {
45
45
const files = appTree . files ;
46
46
47
+ expect ( files ) . toContain ( '/ngcc.config.js' ) ;
47
48
expect ( files ) . toContain ( '/nsconfig.json' ) ;
48
49
expect ( files ) . toContain ( '/tsconfig.tns.json' ) ;
49
50
expect ( files ) . toContain ( '/src/app.css' ) ;
@@ -77,9 +78,9 @@ describe('Add {N} schematic', () => {
77
78
const packageJson = JSON . parse ( getFileContent ( appTree , packageJsonPath ) ) ;
78
79
const { dependencies, devDependencies } = packageJson ;
79
80
expect ( dependencies ) . toBeDefined ( ) ;
80
- expect ( dependencies [ 'nativescript- angular' ] ) . toBeDefined ( ) ;
81
+ expect ( dependencies [ '@ nativescript/ angular' ] ) . toBeDefined ( ) ;
81
82
expect ( dependencies [ '@nativescript/theme' ] ) . toBeDefined ( ) ;
82
- expect ( dependencies [ 'tns- core-modules ' ] ) . toBeDefined ( ) ;
83
+ expect ( dependencies [ '@nativescript/ core' ] ) . toBeDefined ( ) ;
83
84
expect ( dependencies [ 'reflect-metadata' ] ) . toBeDefined ( ) ;
84
85
85
86
expect ( devDependencies [ 'nativescript-dev-webpack' ] ) . toBeDefined ( ) ;
@@ -94,8 +95,10 @@ describe('Add {N} schematic', () => {
94
95
const packageJson = JSON . parse ( getFileContent ( appTree , packageJsonPath ) ) ;
95
96
const { scripts } = packageJson ;
96
97
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' ) ;
99
102
} ) ;
100
103
101
104
it ( 'should add NativeScript key to the package json' , ( ) => {
0 commit comments