@@ -17,19 +17,22 @@ describe('DevServer', () => {
17
17
} ) ;
18
18
19
19
it ( 'should add devServer entry points to a multi entry point object' , ( done ) => {
20
- testBin ( '--config ./test/fixtures/dev-server/multi-entry.js' )
20
+ testBin (
21
+ '--config ./test/fixtures/dev-server/multi-entry.js --stats=verbose'
22
+ )
21
23
. then ( ( output ) => {
22
24
expect ( output . exitCode ) . toEqual ( 0 ) ;
23
25
expect ( output . stderr ) . toContain ( 'client/default/index.js?' ) ;
24
26
expect ( output . stderr ) . toContain ( 'foo.js' ) ;
25
- expect ( output . stderr ) . toContain ( 'bar.js' ) ;
26
27
done ( ) ;
27
28
} )
28
29
. catch ( done ) ;
29
30
} ) ;
30
31
31
32
webpack5Test ( 'should supports entry as descriptor' , ( done ) => {
32
- testBin ( '--config ./test/fixtures/entry-as-descriptor/webpack.config --stats detailed' )
33
+ testBin (
34
+ '--config ./test/fixtures/entry-as-descriptor/webpack.config --stats detailed'
35
+ )
33
36
. then ( ( output ) => {
34
37
expect ( output . exitCode ) . toEqual ( 0 ) ;
35
38
expect ( output . stderr ) . toContain ( 'foo.js' ) ;
@@ -39,7 +42,9 @@ describe('DevServer', () => {
39
42
} ) ;
40
43
41
44
it ( 'should only prepends devServer entry points to "web" target' , ( done ) => {
42
- testBin ( '--config ./test/fixtures/dev-server/default-config.js --target web' )
45
+ testBin (
46
+ '--config ./test/fixtures/dev-server/default-config.js --target web'
47
+ )
43
48
. then ( ( output ) => {
44
49
expect ( output . exitCode ) . toEqual ( 0 ) ;
45
50
expect ( output . stderr ) . toContain ( 'client/default/index.js?' ) ;
@@ -50,7 +55,9 @@ describe('DevServer', () => {
50
55
} ) ;
51
56
52
57
it ( 'should not prepend devServer entry points to "node" target' , ( done ) => {
53
- testBin ( '--config ./test/fixtures/dev-server/default-config.js --target node' )
58
+ testBin (
59
+ '--config ./test/fixtures/dev-server/default-config.js --target node'
60
+ )
54
61
. then ( ( output ) => {
55
62
expect ( output . exitCode ) . toEqual ( 0 ) ;
56
63
expect ( output . stderr ) . not . toContain ( 'client/default/index.js?' ) ;
@@ -61,7 +68,9 @@ describe('DevServer', () => {
61
68
} ) ;
62
69
63
70
it ( 'should prepends the hot runtime to "node" target as well' , ( done ) => {
64
- testBin ( '--config ./test/fixtures/dev-server/default-config.js --target node --hot' )
71
+ testBin (
72
+ '--config ./test/fixtures/dev-server/default-config.js --target node --hot'
73
+ )
65
74
. then ( ( output ) => {
66
75
expect ( output . exitCode ) . toEqual ( 0 ) ;
67
76
expect ( output . stderr ) . toContain ( 'webpack/hot/dev-server' ) ;
@@ -90,13 +99,16 @@ describe('DevServer', () => {
90
99
. catch ( done ) ;
91
100
} ) ;
92
101
93
- it ( 'should prepend devServer entry points depending on targetProperties' , ( done ) => {
94
- testBin ( '--config ./test/fixtures/dev-server/target-config.js' )
95
- . then ( ( output ) => {
96
- expect ( output . exitCode ) . toEqual ( 0 ) ;
97
- expect ( output . stderr ) . toContain ( 'client/default/index.js' ) ;
98
- done ( ) ;
99
- } )
100
- . catch ( done ) ;
101
- } ) ;
102
+ webpack5Test (
103
+ 'should prepend devServer entry points depending on targetProperties' ,
104
+ ( done ) => {
105
+ testBin ( '--config ./test/fixtures/dev-server/target-config.js' )
106
+ . then ( ( output ) => {
107
+ expect ( output . exitCode ) . toEqual ( 0 ) ;
108
+ expect ( output . stderr ) . toContain ( 'client/default/index.js' ) ;
109
+ done ( ) ;
110
+ } )
111
+ . catch ( done ) ;
112
+ }
113
+ ) ;
102
114
} ) ;
0 commit comments