Skip to content

Commit 062d9be

Browse files
committed
test(plugin-typescript-e2e): fix path for windows robust variant
1 parent 686ab91 commit 062d9be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

e2e/plugin-typescript-e2e/tests/collect.e2e.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ function sanitizeReportPaths(report: Report): Report {
3131
},
3232
}),
3333
message: issue.message.replace(
34-
/['"]([^'"]*[/\\][^'"]*)['"]/g,
34+
/['"]([^'"]*\\[^'"]*)['"]/g,
3535
(match, filePath) => {
3636
try {
37-
return `'${osAgnosticPath(filePath)}'`;
37+
const lastSegment = filePath.split(/[/\\]/).pop() || '';
38+
return `'<CWD>/${lastSegment}'`;
3839
} catch {
3940
return match;
4041
}

0 commit comments

Comments
 (0)