3
3
const assert = require ( 'assert' ) ;
4
4
const path = require ( 'path' ) ;
5
5
const execa = require ( 'execa' ) ;
6
+ const semver = require ( 'semver' ) ;
7
+ const pkg = require ( '../package.json' ) ;
6
8
const runDevServer = require ( './helpers/run-webpack-dev-server' ) ;
7
9
10
+ describe ( 'CLI Dependencies' , ( ) => {
11
+ it ( 'should lock down certain dependencies' , ( ) => {
12
+ const yargs = pkg . dependencies . yargs ;
13
+ // yargs needs to be locked down to 6.6.0
14
+ semver . satisfies ( yargs , '6.6.0' ) ;
15
+ } ) ;
16
+ } ) ;
17
+
18
+ describe ( 'CLI' , ( ) => {
19
+ it ( '--progress' , ( done ) => {
20
+ runDevServer ( '--progress' )
21
+ . then ( ( output ) => {
22
+ assert ( output . code === 0 ) ;
23
+ assert ( output . stderr . indexOf ( '0% compiling' ) >= 0 ) ;
24
+ done ( ) ;
25
+ } )
26
+ . catch ( done ) ;
27
+ } ) . timeout ( 6000 ) ;
8
28
9
- describe ( 'SIGINT' , ( ) => {
10
29
it ( 'should exit the process when SIGINT is detected' , ( done ) => {
11
30
const cliPath = path . resolve ( __dirname , '../bin/webpack-dev-server.js' ) ;
12
31
const examplePath = path . resolve ( __dirname , '../examples/cli/public' ) ;
@@ -28,15 +47,3 @@ describe('SIGINT', () => {
28
47
} ) ;
29
48
} ) . timeout ( 6000 ) ;
30
49
} ) ;
31
-
32
- describe ( 'CLI' , ( ) => {
33
- it ( '--progress' , ( done ) => {
34
- runDevServer ( '--progress' )
35
- . then ( ( output ) => {
36
- assert ( output . code === 0 ) ;
37
- assert ( output . stderr . indexOf ( '0% compiling' ) >= 0 ) ;
38
- done ( ) ;
39
- } )
40
- . catch ( done ) ;
41
- } ) . timeout ( 6000 ) ;
42
- } ) ;
0 commit comments