Skip to content

Commit c736cd1

Browse files
committed
fix: lint
1 parent 2d8c586 commit c736cd1

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

test/cli/cli.test.js

+15-14
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,20 +31,30 @@ runCLITest('CLI', () => {
4031
});
4132

4233
webpack5Test('--hot webpack 5', (done) => {
43-
testBin('--hot', path.resolve(__dirname, '../fixtures/cli/verbose-config.js'))
34+
testBin(
35+
'--hot',
36+
path.resolve(__dirname, '../fixtures/cli/verbose-config.js')
37+
)
4438
.then((output) => {
4539
expect(output.exitCode).toEqual(0);
46-
expect(output.stderr).toContain('webpack/runtime/hot module replacement');
40+
expect(output.stderr).toContain(
41+
'webpack/runtime/hot module replacement'
42+
);
4743
done();
4844
})
4945
.catch(done);
5046
});
5147

5248
webpack5Test('--no-hot webpack 5', (done) => {
53-
testBin('--no-hot', path.resolve(__dirname, '../fixtures/cli/verbose-config.js'))
49+
testBin(
50+
'--no-hot',
51+
path.resolve(__dirname, '../fixtures/cli/verbose-config.js')
52+
)
5453
.then((output) => {
5554
expect(output.exitCode).toEqual(0);
56-
expect(output.stderr).not.toContain('webpack/runtime/hot module replacement');
55+
expect(output.stderr).not.toContain(
56+
'webpack/runtime/hot module replacement'
57+
);
5758
done();
5859
})
5960
.catch(done);

test/fixtures/cli/verbose-config.js

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

0 commit comments

Comments
 (0)