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 a75ea8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/babel-core/test/errors-stacks.js
Expand Up @@ -12,9 +12,11 @@ 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, "file://<CWD>", "<CWD>");
stack = replaceAll(stack, process.cwd().replace(/\\/g, "/"), "<CWD>");
stack = stack.replace(/file:\/\/\/?<CWD>/g, "<CWD>");
// Remove jest-related stack frames.
// The `at async Promise.all` frame comes from inside jest-light-runner and is only
// visible when using --run-in-band, comes from inside jest but doesn't have an
Expand Down

0 comments on commit a75ea8b

Please sign in to comment.