@@ -11,7 +11,6 @@ var treeKill = require('tree-kill');
11
11
var child_process = require ( 'child_process' ) ;
12
12
var ng = require ( '../helpers/ng' ) ;
13
13
var root = path . join ( process . cwd ( ) , 'tmp' ) ;
14
- var repoPkgJson = require ( '../../package.json' ) ;
15
14
16
15
function existsSync ( path ) {
17
16
try {
@@ -40,34 +39,26 @@ describe('Basic end-to-end Workflow', function () {
40
39
}
41
40
42
41
43
- // We don't want to use npm link because then npm dependencies
44
- // that only exist in the project will not be accessible to CLI
45
- // This is particularly problematic for --mobile, which uses Universal
46
- // libs as part of the build process.
47
- // Instead, we'll pack CLI as a tarball
48
42
it ( 'Installs angular-cli correctly' , function ( ) {
49
43
this . timeout ( 300000 ) ;
50
44
51
- sh . exec ( 'npm pack ' , { silent : true } ) ;
52
- expect ( existsSync ( path . join ( process . cwd ( ) , `angular-cli- ${ repoPkgJson . version } .tgz` ) ) ) ;
45
+ sh . exec ( 'npm link ' , { silent : true } ) ;
46
+
53
47
return tmp . setup ( './tmp' ) . then ( function ( ) {
54
48
process . chdir ( './tmp' ) ;
49
+ expect ( existsSync ( path . join ( process . cwd ( ) , 'bin' , 'ng' ) ) ) ;
55
50
} ) ;
56
51
} ) ;
57
52
58
53
59
54
it ( 'Can create new project using `ng new test-project`' , function ( ) {
60
55
this . timeout ( 4200000 ) ;
61
- let args = [ '--skip-npm ' ] ;
56
+ let args = [ '--link-cli ' ] ;
62
57
// If testing in the mobile matrix on Travis, create project with mobile flag
63
58
if ( isMobileTest ( ) ) {
64
59
args = args . concat ( [ '--mobile' ] ) ;
65
60
}
66
61
return ng ( [ 'new' , 'test-project' ] . concat ( args ) ) . then ( function ( ) {
67
- // Install Angular CLI from packed version
68
- let tarball = path . resolve ( root , `../angular-cli-${ repoPkgJson . version } .tgz` ) ;
69
- sh . exec ( `npm install && npm install ${ tarball } ` ) ;
70
- sh . exec ( `rm ${ tarball } ` ) ;
71
62
expect ( existsSync ( path . join ( root , 'test-project' ) ) ) ;
72
63
} ) ;
73
64
} ) ;
0 commit comments