Skip to content

Commit 6b0ceb2

Browse files
test: fix
1 parent 8a5b2ca commit 6b0ceb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/cli/cli.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ const isWebpack5 = require('../helpers/isWebpack5');
99
// skip if webpack-dev-server is not linked
1010
let runCLITest = describe;
1111
let basePath;
12+
1213
try {
13-
basePath = path
14-
.join(require.resolve('webpack-dev-server'), '..', '..')
15-
.replace(/\\/g, '/');
14+
basePath = path.join(require.resolve('webpack-dev-server'), '..', '..');
1615
} catch {
1716
runCLITest = describe.skip;
1817
}
@@ -38,6 +37,7 @@ runCLITest('CLI', () => {
3837
'$1 Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT'
3938
)
4039
.replace(/webpack [^ )]+/g, 'webpack x.x.x')
40+
.replace(new RegExp(quotemeta(basePath.replace(/\\/g, '/')), 'g'), 'Xdir')
4141
.replace(new RegExp(quotemeta(basePath), 'g'), 'Xdir')
4242
.replace(/[\\/]static/, '/static')
4343
.replace(/(Hash:) [a-z0-9]+/g, '$1 X')

0 commit comments

Comments
 (0)