1
1
import { createProjectFromAsset } from '../../utils/assets' ;
2
- import { expectFileMatchToExist , expectFileToExist , expectFileToMatch } from '../../utils/fs' ;
2
+ import {
3
+ expectFileMatchToExist ,
4
+ expectFileToExist ,
5
+ expectFileToMatch ,
6
+ writeFile ,
7
+ } from '../../utils/fs' ;
3
8
import { ng , noSilentNg , silentNpm } from '../../utils/process' ;
4
9
import { isPrereleaseCli , useBuiltPackages , useCIChrome , useCIDefaults } from '../../utils/project' ;
5
10
import { expectToFail } from '../../utils/utils' ;
6
11
7
- export default async function ( ) {
8
- await createProjectFromAsset ( '7.0-project' ) ;
9
- await ng ( 'update' , '@angular/cli' , '--migrate-only' , '--from=7' ) ;
12
+ export default async function ( ) {
13
+ await createProjectFromAsset ( '7.0-project' , true ) ;
14
+ // Update Angular.
15
+ await ng ( 'update' , '@angular/core@8' , '@angular/cli@8' , '--force' ) ;
16
+ await ng ( 'update' , '@angular/core@9' , '@angular/cli@9' , '--force' ) ;
10
17
11
18
// Test CLI migrations.
12
19
// Should update the lazy route syntax via update-lazy-module-paths.
@@ -27,11 +34,11 @@ export default async function() {
27
34
await useCIChrome ( 'src/' ) ;
28
35
await useCIChrome ( 'e2e/' ) ;
29
36
await useCIDefaults ( 'seven-oh-project' ) ;
37
+ await writeFile ( '.npmrc' , 'registry = http://localhost:4873' , 'utf8' ) ;
30
38
await silentNpm ( 'install' ) ;
31
39
32
- // Update Angular.
33
40
const extraUpdateArgs = ( await isPrereleaseCli ( ) ) ? [ '--next' , '--force' ] : [ ] ;
34
- await ng ( 'update' , '@angular/core@10' , ...extraUpdateArgs ) ;
41
+ await ng ( 'update' , '@angular/core@10' , '@angular/cli@10' , ...extraUpdateArgs ) ;
35
42
36
43
// Run CLI commands.
37
44
await ng ( 'generate' , 'component' , 'my-comp' ) ;
0 commit comments