@@ -14,7 +14,7 @@ describe('CLI', () => {
14
14
testBin ( '--hot' )
15
15
. then ( ( output ) => {
16
16
expect ( output . exitCode ) . toEqual ( 0 ) ;
17
- expect ( output . stderr ) . toContain ( 'webpack/hot/dev-server.js' ) ;
17
+ expect ( output . stdout ) . toContain ( 'webpack/hot/dev-server.js' ) ;
18
18
done ( ) ;
19
19
} )
20
20
. catch ( done ) ;
@@ -24,7 +24,7 @@ describe('CLI', () => {
24
24
testBin ( '--no-hot' )
25
25
. then ( ( output ) => {
26
26
expect ( output . exitCode ) . toEqual ( 0 ) ;
27
- expect ( output . stderr ) . not . toContain ( 'webpack/hot/dev-server.js' ) ;
27
+ expect ( output . stdout ) . not . toContain ( 'webpack/hot/dev-server.js' ) ;
28
28
done ( ) ;
29
29
} )
30
30
. catch ( done ) ;
@@ -35,7 +35,7 @@ describe('CLI', () => {
35
35
testBin ( '--hot --stats=detailed' )
36
36
. then ( ( output ) => {
37
37
expect ( output . exitCode ) . toEqual ( 0 ) ;
38
- expect ( output . stderr ) . toContain ( 'webpack/hot/dev-server.js' ) ;
38
+ expect ( output . stdout ) . toContain ( 'webpack/hot/dev-server.js' ) ;
39
39
done ( ) ;
40
40
} )
41
41
. catch ( done ) ;
@@ -45,7 +45,7 @@ describe('CLI', () => {
45
45
testBin ( '--no-hot --stats=detailed' )
46
46
. then ( ( output ) => {
47
47
expect ( output . exitCode ) . toEqual ( 0 ) ;
48
- expect ( output . stderr ) . not . toContain ( 'webpack/hot/dev-server.js' ) ;
48
+ expect ( output . stdout ) . not . toContain ( 'webpack/hot/dev-server.js' ) ;
49
49
done ( ) ;
50
50
} )
51
51
. catch ( done ) ;
@@ -56,7 +56,7 @@ describe('CLI', () => {
56
56
testBin ( '--hot-only --stats detailed' )
57
57
. then ( ( output ) => {
58
58
expect ( output . exitCode ) . toEqual ( 0 ) ;
59
- expect ( output . stderr ) . toContain ( '/hot/only-dev-server' ) ;
59
+ expect ( output . stdout ) . toContain ( '/hot/only-dev-server' ) ;
60
60
done ( ) ;
61
61
} )
62
62
. catch ( done ) ;
@@ -152,7 +152,7 @@ describe('CLI', () => {
152
152
expect ( err . stderr ) . toContain (
153
153
"webpack output is served from '/foo/bar' URL"
154
154
) ;
155
- expect ( err . stderr ) . toContain ( 'Compiled successfully. ' ) ;
155
+ expect ( err . stdout ) . toContain ( 'main.js ' ) ;
156
156
done ( ) ;
157
157
} ) ;
158
158
} ) ;
@@ -177,7 +177,7 @@ describe('CLI', () => {
177
177
expect ( err . stderr ) . toContain (
178
178
`Content not from webpack is served from '${ staticDirectory } ' directory`
179
179
) ;
180
- expect ( err . stderr ) . toContain ( 'Compiled successfully. ' ) ;
180
+ expect ( err . stdout ) . toContain ( 'main.js ' ) ;
181
181
done ( ) ;
182
182
} ) ;
183
183
} ) ;
@@ -193,7 +193,7 @@ describe('CLI', () => {
193
193
} )
194
194
. catch ( ( err ) => {
195
195
// for windows
196
- expect ( err . stderr ) . toContain ( 'Compiled successfully. ' ) ;
196
+ expect ( err . stdout ) . toContain ( 'main.js ' ) ;
197
197
done ( ) ;
198
198
} ) ;
199
199
} ) ;
@@ -203,10 +203,10 @@ describe('CLI', () => {
203
203
const examplePath = path . resolve ( __dirname , '../../examples/cli/public' ) ;
204
204
const cp = execa ( 'node' , [ cliPath ] , { cwd : examplePath } ) ;
205
205
206
- cp . stderr . on ( 'data' , ( data ) => {
206
+ cp . stdout . on ( 'data' , ( data ) => {
207
207
const bits = data . toString ( ) ;
208
208
209
- if ( / C o m p i l e d s u c c e s s f u l l y / . test ( bits ) ) {
209
+ if ( / m a i n . j s / . test ( bits ) ) {
210
210
expect ( cp . pid !== 0 ) . toBe ( true ) ;
211
211
212
212
cp . kill ( 'SIGINT' ) ;
@@ -225,7 +225,7 @@ describe('CLI', () => {
225
225
226
226
let killed = false ;
227
227
228
- cp . stderr . on ( 'data' , ( ) => {
228
+ cp . stdout . on ( 'data' , ( ) => {
229
229
if ( ! killed ) {
230
230
expect ( cp . pid !== 0 ) . toBe ( true ) ;
231
231
@@ -245,10 +245,10 @@ describe('CLI', () => {
245
245
const examplePath = path . resolve ( __dirname , '../../examples/cli/public' ) ;
246
246
const cp = execa ( 'node' , [ cliPath , '--stdin' ] , { cwd : examplePath } ) ;
247
247
248
- cp . stderr . on ( 'data' , ( data ) => {
248
+ cp . stdout . on ( 'data' , ( data ) => {
249
249
const bits = data . toString ( ) ;
250
250
251
- if ( / C o m p i l e d s u c c e s s f u l l y / . test ( bits ) ) {
251
+ if ( / m a i n . j s / . test ( bits ) ) {
252
252
expect ( cp . pid !== 0 ) . toBe ( true ) ;
253
253
254
254
cp . stdin . write ( 'hello' ) ;
@@ -268,7 +268,7 @@ describe('CLI', () => {
268
268
269
269
let killed = false ;
270
270
271
- cp . stderr . on ( 'data' , ( ) => {
271
+ cp . stdout . on ( 'data' , ( ) => {
272
272
if ( ! killed ) {
273
273
expect ( cp . pid !== 0 ) . toBe ( true ) ;
274
274
0 commit comments