@@ -66,21 +66,33 @@ describe("basic", () => {
66
66
} ) ;
67
67
68
68
it ( "should accept the promise function of webpack.config.js" , async ( ) => {
69
- try {
70
- const { exitCode } = await testBin ( [
71
- "--config" ,
72
- path . resolve (
73
- __dirname ,
74
- "../fixtures/promise-config/webpack.config.js"
75
- ) ,
76
- "--port" ,
77
- port ,
78
- ] ) ;
79
- expect ( exitCode ) . toEqual ( 0 ) ;
80
- } catch ( err ) {
81
- // for windows
82
- expect ( err . stdout ) . toContain ( "main.js" ) ;
83
- }
69
+ const { exitCode, stderr } = await testBin ( [
70
+ "--config" ,
71
+ path . resolve (
72
+ __dirname ,
73
+ "../fixtures/cli-promise-config/webpack.config.js"
74
+ ) ,
75
+ "--port" ,
76
+ port ,
77
+ ] ) ;
78
+
79
+ expect ( exitCode ) . toEqual ( 0 ) ;
80
+ expect ( normalizeStderr ( stderr , { ipv6 : true } ) ) . toMatchSnapshot ( "stderr" ) ;
81
+ } ) ;
82
+
83
+ it ( "should work using multi compiler mode" , async ( ) => {
84
+ const { exitCode, stderr } = await testBin ( [
85
+ "--config" ,
86
+ path . resolve (
87
+ __dirname ,
88
+ "../fixtures/cli-universal-compiler-config/webpack.config.js"
89
+ ) ,
90
+ "--port" ,
91
+ port ,
92
+ ] ) ;
93
+
94
+ expect ( exitCode ) . toEqual ( 0 ) ;
95
+ expect ( normalizeStderr ( stderr , { ipv6 : true } ) ) . toMatchSnapshot ( "stderr" ) ;
84
96
} ) ;
85
97
86
98
it ( "should exit the process when SIGINT is detected" , ( done ) => {
@@ -210,7 +222,7 @@ describe("basic", () => {
210
222
"--port" ,
211
223
port ,
212
224
"--config" ,
213
- "./test/fixtures/dev-server/default- config.js" ,
225
+ "./test/fixtures/cli-single-entry/webpack. config.js" ,
214
226
] ) ;
215
227
216
228
expect ( exitCode ) . toEqual ( 0 ) ;
@@ -224,7 +236,7 @@ describe("basic", () => {
224
236
"--port" ,
225
237
port ,
226
238
"--config" ,
227
- "./test/fixtures/dev-server/ multi-entry.js" ,
239
+ "./test/fixtures/cli- multi-entry/webpack.config .js" ,
228
240
"--stats" ,
229
241
"verbose" ,
230
242
] ) ;
@@ -242,7 +254,7 @@ describe("basic", () => {
242
254
"--port" ,
243
255
port ,
244
256
"--config" ,
245
- "./test/fixtures/dev-server/ empty-entry.js" ,
257
+ "./test/fixtures/cli- empty-entry/webpack.config .js" ,
246
258
] ) ;
247
259
248
260
expect ( exitCode ) . toEqual ( 0 ) ;
@@ -255,7 +267,7 @@ describe("basic", () => {
255
267
"--port" ,
256
268
port ,
257
269
"--config" ,
258
- "./test/fixtures/entry-as-descriptor/webpack.config" ,
270
+ "./test/fixtures/cli- entry-as-descriptor/webpack.config" ,
259
271
"--stats" ,
260
272
"detailed" ,
261
273
] ) ;
@@ -310,7 +322,7 @@ describe("basic", () => {
310
322
"--port" ,
311
323
port ,
312
324
"--config" ,
313
- "./test/fixtures/dev-server/ target-config.js" ,
325
+ "./test/fixtures/cli- target-config/webpack. config.js" ,
314
326
] ) ;
315
327
316
328
expect ( exitCode ) . toEqual ( 0 ) ;
0 commit comments