Skip to content

Commit

Permalink
Return correct file path for mjs files.
Browse files Browse the repository at this point in the history
Workaround for tapjs/stack-utils#60
  • Loading branch information
mshima authored Jan 29, 2022
1 parent d1bc333 commit 05e3b00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/jest-message-util/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ export const getTopFrame = (lines: Array<string>): Frame | null => {
const parsedFrame = stackUtils.parseLine(line.trim());

if (parsedFrame && parsedFrame.file) {
if (frame.file.startsWith('file://')) {
frame.file = new URL(frame.file).pathname;
}
return parsedFrame as Frame;
}
}
Expand Down

0 comments on commit 05e3b00

Please sign in to comment.