From b7ae984ca1ebd4e94975c765fc1b972704a6a7fb Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Tue, 23 Jan 2024 20:23:01 -0800 Subject: [PATCH] fix(windows): update some bundler tests (#8440) * replace invalid path character * windows paths --- test/bundler/esbuild/ts.test.ts | 2 +- test/bundler/expectBundled.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/bundler/esbuild/ts.test.ts b/test/bundler/esbuild/ts.test.ts index 7d5fd8c1a8..8992cecb93 100644 --- a/test/bundler/esbuild/ts.test.ts +++ b/test/bundler/esbuild/ts.test.ts @@ -1050,7 +1050,7 @@ describe("bundler", () => { ]); }, }); - itBundled("ts/ExportType*", { + itBundled("ts/ExportTypeSTAR", { files: { "/entry.ts": /* ts */ ` export type * as Foo from "foo"; diff --git a/test/bundler/expectBundled.ts b/test/bundler/expectBundled.ts index d81078d8bc..2e32926e56 100644 --- a/test/bundler/expectBundled.ts +++ b/test/bundler/expectBundled.ts @@ -706,8 +706,11 @@ function expectBundled( } return { error, file: "" }; } - 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 }; })