33const assert = require ( 'assert' ) ;
44const path = require ( 'path' ) ;
55const execa = require ( 'execa' ) ;
6+ const semver = require ( 'semver' ) ;
7+ const pkg = require ( '../package.json' ) ;
68const runDevServer = require ( './helpers/run-webpack-dev-server' ) ;
79
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 ) ;
828
9- describe ( 'SIGINT' , ( ) => {
1029 it ( 'should exit the process when SIGINT is detected' , ( done ) => {
1130 const cliPath = path . resolve ( __dirname , '../bin/webpack-dev-server.js' ) ;
1231 const examplePath = path . resolve ( __dirname , '../examples/cli/public' ) ;
@@ -28,15 +47,3 @@ describe('SIGINT', () => {
2847 } ) ;
2948 } ) . timeout ( 6000 ) ;
3049} ) ;
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