@@ -4,34 +4,9 @@ const path = require('path');
4
4
const execa = require ( 'execa' ) ;
5
5
const internalIp = require ( 'internal-ip' ) ;
6
6
const testBin = require ( '../helpers/test-bin' ) ;
7
- const isWebpack5 = require ( '../helpers/isWebpack5' ) ;
8
7
9
8
describe ( 'CLI' , ( ) => {
10
- const webpack4Test = isWebpack5 ? it . skip : it ;
11
- const webpack5Test = isWebpack5 ? it : it . skip ;
12
-
13
- webpack4Test ( '--hot webpack 4' , ( done ) => {
14
- testBin ( '--hot' )
15
- . then ( ( output ) => {
16
- expect ( output . exitCode ) . toEqual ( 0 ) ;
17
- expect ( output . stdout ) . toContain ( 'webpack/hot/dev-server.js' ) ;
18
- done ( ) ;
19
- } )
20
- . catch ( done ) ;
21
- } ) ;
22
-
23
- webpack4Test ( '--no-hot webpack 4' , ( done ) => {
24
- testBin ( '--no-hot' )
25
- . then ( ( output ) => {
26
- expect ( output . exitCode ) . toEqual ( 0 ) ;
27
- expect ( output . stdout ) . not . toContain ( 'webpack/hot/dev-server.js' ) ;
28
- done ( ) ;
29
- } )
30
- . catch ( done ) ;
31
- } ) ;
32
-
33
- webpack5Test ( '--hot webpack 5' , ( done ) => {
34
- // need detailed stats to check for 'dev-server.js'
9
+ it ( '--hot' , ( done ) => {
35
10
testBin ( '--hot --stats=detailed' )
36
11
. then ( ( output ) => {
37
12
expect ( output . exitCode ) . toEqual ( 0 ) ;
@@ -41,8 +16,8 @@ describe('CLI', () => {
41
16
. catch ( done ) ;
42
17
} ) ;
43
18
44
- webpack5Test ( '--no-hot webpack 5 ' , ( done ) => {
45
- testBin ( '--no-hot --stats=detailed ' )
19
+ it ( '--no-hot' , ( done ) => {
20
+ testBin ( '--no-hot' )
46
21
. then ( ( output ) => {
47
22
expect ( output . exitCode ) . toEqual ( 0 ) ;
48
23
expect ( output . stdout ) . not . toContain ( 'webpack/hot/dev-server.js' ) ;
@@ -52,8 +27,7 @@ describe('CLI', () => {
52
27
} ) ;
53
28
54
29
it ( '--hot-only' , ( done ) => {
55
- // need detailed stats to check for 'only-dev-server.js'
56
- testBin ( '--hot-only --stats detailed' )
30
+ testBin ( '--hot-only' )
57
31
. then ( ( output ) => {
58
32
expect ( output . exitCode ) . toEqual ( 0 ) ;
59
33
expect ( output . stdout ) . toContain ( '/hot/only-dev-server' ) ;
0 commit comments