@@ -19,6 +19,8 @@ function existsSync(path) {
19
19
}
20
20
}
21
21
22
+ const ngBin = path . join ( process . cwd ( ) , 'bin' , 'ng' ) ;
23
+
22
24
describe ( 'Basic end-to-end Workflow' , function ( ) {
23
25
before ( conf . setup ) ;
24
26
@@ -45,7 +47,7 @@ describe('Basic end-to-end Workflow', function () {
45
47
it ( 'Can create new project using `ng new test-project`' , function ( ) {
46
48
this . timeout ( 4200000 ) ;
47
49
48
- return ng ( [ 'new' , 'test-project' , '--silent' ] ) . then ( function ( ) {
50
+ return ng ( [ 'new' , 'test-project' ] ) . then ( function ( ) {
49
51
expect ( existsSync ( path . join ( root , 'test-project' ) ) ) ;
50
52
} ) ;
51
53
} ) ;
@@ -62,7 +64,7 @@ describe('Basic end-to-end Workflow', function () {
62
64
63
65
// Can't user the `ng` helper because somewhere the environment gets
64
66
// stuck to the first build done
65
- sh . exec ( 'ng build --environment=production --silent' ) ;
67
+ sh . exec ( ` ${ ngBin } build --environment=production` ) ;
66
68
expect ( existsSync ( path . join ( process . cwd ( ) , 'dist' ) ) ) . to . be . equal ( true ) ;
67
69
var appBundlePath = path . join ( process . cwd ( ) , 'dist' , 'app' , 'index.js' ) ;
68
70
var appBundleContent = fs . readFileSync ( appBundlePath , { encoding : 'utf8' } ) ;
@@ -75,7 +77,7 @@ describe('Basic end-to-end Workflow', function () {
75
77
it ( 'Can run `ng build` in created project' , function ( ) {
76
78
this . timeout ( 420000 ) ;
77
79
78
- return ng ( [ 'build' , '--silent' ] )
80
+ return ng ( [ 'build' ] )
79
81
. catch ( ( ) => {
80
82
throw new Error ( 'Build failed.' ) ;
81
83
} )
@@ -192,7 +194,7 @@ describe('Basic end-to-end Workflow', function () {
192
194
const tmpFileLocation = path . join ( process . cwd ( ) , 'dist' , 'test.abc' ) ;
193
195
fs . writeFileSync ( tmpFile , 'hello world' ) ;
194
196
195
- return ng ( [ 'build' , '--silent' ] )
197
+ return ng ( [ 'build' ] )
196
198
. then ( function ( ) {
197
199
expect ( existsSync ( tmpFileLocation ) ) . to . be . equal ( true ) ;
198
200
} )
@@ -201,7 +203,7 @@ describe('Basic end-to-end Workflow', function () {
201
203
} ) ;
202
204
} ) ;
203
205
204
- it ( 'Installs sass support successfully' , function ( ) {
206
+ it . skip ( 'Installs sass support successfully' , function ( ) {
205
207
this . timeout ( 420000 ) ;
206
208
207
209
sh . exec ( 'npm install node-sass' , { silent : true } ) ;
@@ -218,15 +220,15 @@ describe('Basic end-to-end Workflow', function () {
218
220
let scssExample = '.outer {\n .inner { background: #fff; }\n }' ;
219
221
fs . writeFileSync ( scssFile , scssExample , 'utf8' ) ;
220
222
221
- sh . exec ( 'ng build --silent' ) ;
223
+ sh . exec ( ` ${ ngBin } build` ) ;
222
224
let destCss = path . join ( process . cwd ( ) , 'dist' , 'app' , 'test-component' , 'test-component.component.css' ) ;
223
225
expect ( existsSync ( destCss ) ) . to . be . equal ( true ) ;
224
226
let contents = fs . readFileSync ( destCss , 'utf8' ) ;
225
227
expect ( contents ) . to . include ( '.outer .inner' ) ;
226
228
227
229
sh . rm ( '-f' , destCss ) ;
228
230
process . chdir ( 'src' ) ;
229
- sh . exec ( 'ng build --silent' ) ;
231
+ sh . exec ( ` ${ ngBin } build` ) ;
230
232
expect ( existsSync ( destCss ) ) . to . be . equal ( true ) ;
231
233
contents = fs . readFileSync ( destCss , 'utf8' ) ;
232
234
expect ( contents ) . to . include ( '.outer .inner' ) ;
@@ -236,7 +238,7 @@ describe('Basic end-to-end Workflow', function () {
236
238
} ) ;
237
239
} ) ;
238
240
239
- it ( 'Installs less support successfully' , function ( ) {
241
+ it . skip ( 'Installs less support successfully' , function ( ) {
240
242
this . timeout ( 420000 ) ;
241
243
242
244
sh . exec ( 'npm install less' , { silent : true } ) ;
@@ -253,15 +255,15 @@ describe('Basic end-to-end Workflow', function () {
253
255
let lessExample = '.outer {\n .inner { background: #fff; }\n }' ;
254
256
fs . writeFileSync ( lessFile , lessExample , 'utf8' ) ;
255
257
256
- sh . exec ( 'ng build --silent' ) ;
258
+ sh . exec ( ` ${ ngBin } build` ) ;
257
259
let destCss = path . join ( process . cwd ( ) , 'dist' , 'app' , 'test-component' , 'test-component.component.css' ) ;
258
260
expect ( existsSync ( destCss ) ) . to . be . equal ( true ) ;
259
261
let contents = fs . readFileSync ( destCss , 'utf8' ) ;
260
262
expect ( contents ) . to . include ( '.outer .inner' ) ;
261
263
262
264
sh . rm ( '-f' , destCss ) ;
263
265
process . chdir ( 'src' ) ;
264
- sh . exec ( 'ng build --silent' ) ;
266
+ sh . exec ( ` ${ ngBin } build` ) ;
265
267
expect ( existsSync ( destCss ) ) . to . be . equal ( true ) ;
266
268
contents = fs . readFileSync ( destCss , 'utf8' ) ;
267
269
expect ( contents ) . to . include ( '.outer .inner' ) ;
@@ -271,7 +273,7 @@ describe('Basic end-to-end Workflow', function () {
271
273
} ) ;
272
274
} ) ;
273
275
274
- it ( 'Installs stylus support successfully' , function ( ) {
276
+ it . skip ( 'Installs stylus support successfully' , function ( ) {
275
277
this . timeout ( 420000 ) ;
276
278
277
279
sh . exec ( 'npm install stylus' , { silent : true } ) ;
@@ -287,15 +289,15 @@ describe('Basic end-to-end Workflow', function () {
287
289
let stylusExample = '.outer {\n .inner { background: #fff; }\n }' ;
288
290
fs . writeFileSync ( stylusFile , stylusExample , 'utf8' ) ;
289
291
290
- sh . exec ( 'ng build --silent' ) ;
292
+ sh . exec ( ` ${ ngBin } build` ) ;
291
293
let destCss = path . join ( process . cwd ( ) , 'dist' , 'app' , 'test-component' , 'test-component.component.css' ) ;
292
294
expect ( existsSync ( destCss ) ) . to . be . equal ( true ) ;
293
295
let contents = fs . readFileSync ( destCss , 'utf8' ) ;
294
296
expect ( contents ) . to . include ( '.outer .inner' ) ;
295
297
296
298
sh . rm ( '-f' , destCss ) ;
297
299
process . chdir ( 'src' ) ;
298
- sh . exec ( 'ng build --silent' ) ;
300
+ sh . exec ( ` ${ ngBin } build` ) ;
299
301
expect ( existsSync ( destCss ) ) . to . be . equal ( true ) ;
300
302
contents = fs . readFileSync ( destCss , 'utf8' ) ;
301
303
expect ( contents ) . to . include ( '.outer .inner' ) ;
@@ -316,7 +318,7 @@ describe('Basic end-to-end Workflow', function () {
316
318
317
319
sh . rm ( '-rf' , path . join ( process . cwd ( ) , 'dist' ) ) ;
318
320
319
- return ng ( [ 'build' , '--silent' ] )
321
+ return ng ( [ 'build' ] )
320
322
. then ( function ( ) {
321
323
expect ( existsSync ( path . join ( process . cwd ( ) , 'dist' ) ) ) . to . be . equal ( true ) ;
322
324
} )
0 commit comments