diff --git a/apps/oxlint/test/utils.ts b/apps/oxlint/test/utils.ts index 41ab6bf537b2b..274a9abd8f968 100644 --- a/apps/oxlint/test/utils.ts +++ b/apps/oxlint/test/utils.ts @@ -92,10 +92,12 @@ function normalizeStdout(stdout: string): string { match = line.match(/^(\s*\|\s+File path: )(.+)$/); if (match) { const [, preamble, path] = match; - if (path.startsWith(REPO_ROOT_PATH)) return [`${preamble}/${path.slice(REPO_ROOT_PATH.length)}`]; + if (path.startsWith(REPO_ROOT_PATH)) { + return [`${preamble}/${path.slice(REPO_ROOT_PATH.length).replace(/\\/g, '/')}`]; + } } } - if (line.startsWith(REPO_ROOT_PATH)) line = `/${line.slice(REPO_ROOT_PATH.length)}`; + if (line.startsWith(REPO_ROOT_PATH)) line = `/${line.slice(REPO_ROOT_PATH.length).replace(/\\/g, '/')}`; return [line]; });