Skip to content

Commit c75de92

Browse files
test: fix
1 parent 2cf7be7 commit c75de92

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/helpers/test-bin.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const path = require('path');
44
const execa = require('execa');
5+
const stripAnsi = require('strip-ansi');
56
const internalIp = require('internal-ip');
67

78
const webpackDevServerPath = path.resolve(
@@ -33,12 +34,11 @@ function testBin(testArgs, configPath) {
3334
}
3435

3536
function normalizeStderr(stderr, options = {}) {
36-
let normalizedStderr = stderr;
37+
let normalizedStderr = stripAnsi(stderr);
3738

38-
normalizedStderr = normalizedStderr.replace(
39-
new RegExp(process.cwd(), 'g'),
40-
'<cwd>'
41-
);
39+
normalizedStderr = normalizedStderr
40+
.replace(/\\/g, '/')
41+
.replace(new RegExp(process.cwd(), 'g'), '<cwd>');
4242

4343
const networkIPv4 = internalIp.v4.sync();
4444

0 commit comments

Comments
 (0)