Skip to content

Commit 165e97e

Browse files
committed
fix(oxlint): normalize path separators in snap tests
1 parent 4e18de1 commit 165e97e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/oxlint/test/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ function normalizeStdout(stdout: string): string {
9292
match = line.match(/^(\s*\|\s+File path: )(.+)$/);
9393
if (match) {
9494
const [, preamble, path] = match;
95-
if (path.startsWith(REPO_ROOT_PATH)) return [`${preamble}<root>/${path.slice(REPO_ROOT_PATH.length)}`];
95+
if (path.startsWith(REPO_ROOT_PATH)) return [`${preamble}<root>/${path.slice(REPO_ROOT_PATH.length).replace(/\\/g, '/')}`];
9696
}
9797
}
98-
if (line.startsWith(REPO_ROOT_PATH)) line = `<root>/${line.slice(REPO_ROOT_PATH.length)}`;
98+
if (line.startsWith(REPO_ROOT_PATH)) line = `<root>/${line.slice(REPO_ROOT_PATH.length).replace(/\\/g, '/')}`;
9999
return [line];
100100
});
101101

0 commit comments

Comments
 (0)