Skip to content

Commit 6689cb8

Browse files
committedJan 9, 2018
adding test for dependency lock-down
1 parent 3e220fe commit 6689cb8

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed
 

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"mocha-sinon": "^2.0.0",
9191
"pug": "^2.0.0-beta5",
9292
"pug-loader": "^2.3.0",
93+
"semver": "^5.4.1",
9394
"should": "^13.2.0",
9495
"sinon": "^4.1.3",
9596
"style-loader": "^0.19.1",

‎test/cli.test.js

+20-13
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,29 @@
33
const assert = require('assert');
44
const path = require('path');
55
const execa = require('execa');
6+
const semver = require('semver');
7+
const pkg = require('../package.json');
68
const 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

Comments
 (0)