@@ -7,7 +7,7 @@ describe('DevServer', () => {
77 const webpack5Test = isWebpack5 ? it : it . skip ;
88
99 it ( 'should add devServer entry points to a single entry point' , ( done ) => {
10- testBin ( '--config ./test/fixtures/dev-server/default-config.js')
10+ testBin ( null , ' ./test/fixtures/dev-server/default-config.js')
1111 . then ( ( output ) => {
1212 expect ( output . exitCode ) . toEqual ( 0 ) ;
1313 expect ( output . stdout ) . toContain ( 'client/default/index.js?' ) ;
@@ -19,9 +19,7 @@ describe('DevServer', () => {
1919 webpack5Test (
2020 'should add devServer entry points to a multi entry point object' ,
2121 ( done ) => {
22- testBin (
23- '--config ./test/fixtures/dev-server/multi-entry.js --stats=verbose'
24- )
22+ testBin ( '--stats=verbose' , './test/fixtures/dev-server/multi-entry.js' )
2523 . then ( ( output ) => {
2624 expect ( output . exitCode ) . toEqual ( 0 ) ;
2725 expect ( output . stdout ) . toContain ( 'client/default/index.js?' ) ;
@@ -35,7 +33,7 @@ describe('DevServer', () => {
3533 webpack5Test (
3634 'should add devServer entry points to an empty entry object' ,
3735 ( done ) => {
38- testBin ( '--config ./test/fixtures/dev-server/empty-entry.js')
36+ testBin ( null , ' ./test/fixtures/dev-server/empty-entry.js')
3937 . then ( ( output ) => {
4038 expect ( output . exitCode ) . toEqual ( 0 ) ;
4139 expect ( output . stdout ) . toContain ( 'client/default/index.js?' ) ;
@@ -47,7 +45,8 @@ describe('DevServer', () => {
4745
4846 webpack5Test ( 'should supports entry as descriptor' , ( done ) => {
4947 testBin (
50- '--config ./test/fixtures/entry-as-descriptor/webpack.config --stats detailed'
48+ '--stats detailed' ,
49+ './test/fixtures/entry-as-descriptor/webpack.config'
5150 )
5251 . then ( ( output ) => {
5352 expect ( output . exitCode ) . toEqual ( 0 ) ;
@@ -58,9 +57,7 @@ describe('DevServer', () => {
5857 } ) ;
5958
6059 it ( 'should only prepends devServer entry points to "web" target' , ( done ) => {
61- testBin (
62- '--config ./test/fixtures/dev-server/default-config.js --target web'
63- )
60+ testBin ( '--target web' , './test/fixtures/dev-server/default-config.js' )
6461 . then ( ( output ) => {
6562 expect ( output . exitCode ) . toEqual ( 0 ) ;
6663 expect ( output . stdout ) . toContain ( 'client/default/index.js?' ) ;
@@ -71,9 +68,7 @@ describe('DevServer', () => {
7168 } ) ;
7269
7370 it ( 'should not prepend devServer entry points to "node" target' , ( done ) => {
74- testBin (
75- '--config ./test/fixtures/dev-server/default-config.js --target node'
76- )
71+ testBin ( '--target node' , './test/fixtures/dev-server/default-config.js' )
7772 . then ( ( output ) => {
7873 expect ( output . exitCode ) . toEqual ( 0 ) ;
7974 expect ( output . stdout ) . not . toContain ( 'client/default/index.js?' ) ;
@@ -85,7 +80,8 @@ describe('DevServer', () => {
8580
8681 it ( 'should prepends the hot runtime to "node" target as well' , ( done ) => {
8782 testBin (
88- '--config ./test/fixtures/dev-server/default-config.js --target node --hot'
83+ '--target node --hot' ,
84+ './test/fixtures/dev-server/default-config.js'
8985 )
9086 . then ( ( output ) => {
9187 expect ( output . exitCode ) . toEqual ( 0 ) ;
@@ -112,7 +108,7 @@ describe('DevServer', () => {
112108 } ) ;
113109
114110 it ( 'does not use client.path when default' , ( done ) => {
115- testBin ( '--config ./test/fixtures/dev-server/client-default-path-config.js')
111+ testBin ( null , ' ./test/fixtures/dev-server/client-default-path-config.js')
116112 . then ( ( output ) => {
117113 expect ( output . exitCode ) . toEqual ( 0 ) ;
118114 expect ( output . stdout ) . not . toContain ( '&path=/ws' ) ;
@@ -122,7 +118,7 @@ describe('DevServer', () => {
122118 } ) ;
123119
124120 it ( 'should use client.path when custom' , ( done ) => {
125- testBin ( '--config ./test/fixtures/dev-server/client-custom-path-config.js')
121+ testBin ( null , ' ./test/fixtures/dev-server/client-custom-path-config.js')
126122 . then ( ( output ) => {
127123 expect ( output . exitCode ) . toEqual ( 0 ) ;
128124 expect ( output . stdout ) . toContain ( '&path=/custom/path' ) ;
@@ -134,7 +130,7 @@ describe('DevServer', () => {
134130 webpack5Test (
135131 'should prepend devServer entry points depending on targetProperties' ,
136132 ( done ) => {
137- testBin ( '--config ./test/fixtures/dev-server/target-config.js')
133+ testBin ( null , ' ./test/fixtures/dev-server/target-config.js')
138134 . then ( ( output ) => {
139135 expect ( output . exitCode ) . toEqual ( 0 ) ;
140136 expect ( output . stdout ) . toContain ( 'client/default/index.js' ) ;
0 commit comments