Skip to content

Commit f3d5e2f

Browse files
committed
Fix jestSkipFileInExceptionSource not accounting for multiple frames with the filepath
1 parent a3adf15 commit f3d5e2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/exception/jest-skip-source-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const jestSkipFileInExceptionSource = (
1919
return e;
2020
}
2121

22-
const all = filepath instanceof RegExp && filepath.global;
22+
const all = filepath instanceof RegExp ? filepath.global : true;
2323
e.stack = e.stack?.[all ? 'replaceAll' : 'replace'](filepath, (substr) => {
2424
const path = substr.match(/\s+at /)
2525
? stacktrace.parse({ stack: 'Error \n' + substr } as any)[0].getFileName()

0 commit comments

Comments
 (0)