Skip to content
Snippets Groups Projects
Unverified Commit 3d2cabb3 authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

test: fix jest wrapper (#27636)

parent a9bb5b91
No related branches found
Tags 37.172.0
No related merge requests found
...@@ -31,6 +31,8 @@ function execSnapshot(cmd: string, options?: RawExecOptions): ExecSnapshot { ...@@ -31,6 +31,8 @@ function execSnapshot(cmd: string, options?: RawExecOptions): ExecSnapshot {
if (is.string(v)) { if (is.string(v)) {
const val = v const val = v
.replace(regEx(/\\(\w)/g), '/$1') .replace(regEx(/\\(\w)/g), '/$1')
.replace(regEx(/^[A-Z]:\//), '/') // replace windows paths
.replace(regEx(/"[A-Z]:\//g), '"/') // replace windows paths
.replace(cwd, '/root/project'); .replace(cwd, '/root/project');
this.update(val); this.update(val);
} }
......
...@@ -25,4 +25,8 @@ args.push('node_modules/jest/bin/jest.js', '--logHeapUsage'); ...@@ -25,4 +25,8 @@ args.push('node_modules/jest/bin/jest.js', '--logHeapUsage');
// add other args after `node tools/jest.mjs` // add other args after `node tools/jest.mjs`
args.push(...argv.slice(2)); args.push(...argv.slice(2));
spawnSync('node', args, { stdio: 'inherit', env }); const res = spawnSync('node', args, { stdio: 'inherit', env });
if (res.status !== null && res.status !== 0) {
process.exit(res.status);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment