Skip to content

Commit

Permalink
Fix windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Aug 24, 2022
1 parent fae9608 commit 14a3300
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/babel-core/test/errors-stacks.js
Expand Up @@ -12,8 +12,10 @@ function expectError(run) {
run();
} catch (e) {
let { stack } = e;
// Normalize windows paths
stack = stack.replace(/\\/g, "/");
// Remove absolute URLs
stack = replaceAll(stack, process.cwd(), "<CWD>");
stack = replaceAll(stack, process.cwd().replace(/\\/g, "/"), "<CWD>");
stack = replaceAll(stack, "file://<CWD>", "<CWD>");
// Remove jest-related stack frames.
// The `at async Promise.all` frame comes from inside jest-light-runner and is only
Expand Down

0 comments on commit 14a3300

Please sign in to comment.