Skip to content

Commit a815efc

Browse files
committed
fix: lint
1 parent 2cd25c4 commit a815efc

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

test/cli/cli.test.js

+5-24
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,7 @@ const internalIp = require('internal-ip');
66
const testBin = require('../helpers/test-bin');
77
const isWebpack5 = require('../helpers/isWebpack5');
88

9-
// skip if webpack-dev-server is not linked
10-
let runCLITest = describe;
11-
12-
try {
13-
basePath = path.join(require.resolve('webpack-dev-server'), '..', '..');
14-
} catch {
15-
runCLITest = describe.skip;
16-
}
17-
18-
runCLITest('CLI', () => {
9+
describe('CLI', () => {
1910
const webpack4Test = isWebpack5 ? it.skip : it;
2011
const webpack5Test = isWebpack5 ? it : it.skip;
2112

@@ -40,30 +31,20 @@ runCLITest('CLI', () => {
4031
});
4132

4233
webpack5Test('--hot webpack 5', (done) => {
43-
testBin(
44-
'--hot',
45-
path.resolve(__dirname, '../fixtures/cli/verbose-config.js')
46-
)
34+
testBin('--hot', path.resolve(__dirname, '../fixtures/cli/verbose-config.js'))
4735
.then((output) => {
4836
expect(output.exitCode).toEqual(0);
49-
expect(output.stderr).toContain(
50-
'webpack/runtime/hot module replacement'
51-
);
37+
expect(output.stderr).toContain('webpack/runtime/hot module replacement');
5238
done();
5339
})
5440
.catch(done);
5541
});
5642

5743
webpack5Test('--no-hot webpack 5', (done) => {
58-
testBin(
59-
'--no-hot',
60-
path.resolve(__dirname, '../fixtures/cli/verbose-config.js')
61-
)
44+
testBin('--no-hot', path.resolve(__dirname, '../fixtures/cli/verbose-config.js'))
6245
.then((output) => {
6346
expect(output.exitCode).toEqual(0);
64-
expect(output.stderr).not.toContain(
65-
'webpack/runtime/hot module replacement'
66-
);
47+
expect(output.stderr).not.toContain('webpack/runtime/hot module replacement');
6748
done();
6849
})
6950
.catch(done);

test/fixtures/cli/verbose-config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = {
24
stats: 'verbose',
35
mode: 'development',

0 commit comments

Comments
 (0)