fix(windows): update some bundler tests (#8440)

* replace invalid path character

* windows paths
This commit is contained in:
Dylan Conway
2024-01-23 20:23:01 -08:00
committed by GitHub
parent e848c3f226
commit b7ae984ca1
2 changed files with 6 additions and 3 deletions

View File

@@ -1050,7 +1050,7 @@ describe("bundler", () => {
]);
},
});
itBundled("ts/ExportType*", {
itBundled("ts/ExportTypeSTAR", {
files: {
"/entry.ts": /* ts */ `
export type * as Foo from "foo";

View File

@@ -706,8 +706,11 @@ function expectBundled(
}
return { error, file: "<bun>" };
}
const [_str2, fullFilename, line, col] = source?.match?.(/bun-build-tests\/(.*):(\d+):(\d+)/) ?? [];
const file = fullFilename?.slice?.(id.length + path.basename(outBase).length + 1);
const [_str2, fullFilename, line, col] =
source?.match?.(/bun-build-tests[\/\\](.*):(\d+):(\d+)/) ?? [];
const file = fullFilename
?.slice?.(id.length + path.basename(outBase).length + 1)
.replaceAll("\\", "/");
return { error, file, line, col };
})