diff --git a/package.json b/package.json index 143e994a1f..f0afe98c4e 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "mocha-sinon": "^2.0.0", "pug": "^2.0.0-beta5", "pug-loader": "^2.3.0", + "semver": "^5.4.1", "should": "^13.2.0", "sinon": "^4.1.3", "style-loader": "^0.19.1", diff --git a/test/cli.test.js b/test/cli.test.js index d50418d1e6..6906c15167 100644 --- a/test/cli.test.js +++ b/test/cli.test.js @@ -3,10 +3,29 @@ const assert = require('assert'); const path = require('path'); const execa = require('execa'); +const semver = require('semver'); +const pkg = require('../package.json'); const runDevServer = require('./helpers/run-webpack-dev-server'); +describe('CLI Dependencies', () => { + it('should lock down certain dependencies', () => { + const yargs = pkg.dependencies.yargs; + // yargs needs to be locked down to 6.6.0 + semver.satisfies(yargs, '6.6.0'); + }); +}); + +describe('CLI', () => { + it('--progress', (done) => { + runDevServer('--progress') + .then((output) => { + assert(output.code === 0); + assert(output.stderr.indexOf('0% compiling') >= 0); + done(); + }) + .catch(done); + }).timeout(6000); -describe('SIGINT', () => { it('should exit the process when SIGINT is detected', (done) => { const cliPath = path.resolve(__dirname, '../bin/webpack-dev-server.js'); const examplePath = path.resolve(__dirname, '../examples/cli/public'); @@ -28,15 +47,3 @@ describe('SIGINT', () => { }); }).timeout(6000); }); - -describe('CLI', () => { - it('--progress', (done) => { - runDevServer('--progress') - .then((output) => { - assert(output.code === 0); - assert(output.stderr.indexOf('0% compiling') >= 0); - done(); - }) - .catch(done); - }).timeout(6000); -});