We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2cf7be7 commit c75de92Copy full SHA for c75de92
test/helpers/test-bin.js
@@ -2,6 +2,7 @@
2
3
const path = require('path');
4
const execa = require('execa');
5
+const stripAnsi = require('strip-ansi');
6
const internalIp = require('internal-ip');
7
8
const webpackDevServerPath = path.resolve(
@@ -33,12 +34,11 @@ function testBin(testArgs, configPath) {
33
34
}
35
36
function normalizeStderr(stderr, options = {}) {
- let normalizedStderr = stderr;
37
+ let normalizedStderr = stripAnsi(stderr);
38
- normalizedStderr = normalizedStderr.replace(
39
- new RegExp(process.cwd(), 'g'),
40
- '<cwd>'
41
- );
+ normalizedStderr = normalizedStderr
+ .replace(/\\/g, '/')
+ .replace(new RegExp(process.cwd(), 'g'), '<cwd>');
42
43
const networkIPv4 = internalIp.v4.sync();
44
0 commit comments