From a7adab9e15d1212b5c2a987bc9dfebed74056c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 1 Feb 2024 19:54:26 +0900 Subject: [PATCH] fix windows --- packages/cli/src/swc/__tests__/util.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/swc/__tests__/util.test.ts b/packages/cli/src/swc/__tests__/util.test.ts index 9a4e583..4a2bbdf 100644 --- a/packages/cli/src/swc/__tests__/util.test.ts +++ b/packages/cli/src/swc/__tests__/util.test.ts @@ -5,18 +5,18 @@ describe("getDest", () => { it("does not modify the filename by default", () => { expect( getDest(join(process.cwd(), "src/path/name.ts"), "foo/bar", false) - ).toEqual("foo/bar/src/path/name.ts"); + ).toEqual(join("foo", "bar", "src", "path", "name.ts")); }); it("when stripLeadingPaths is true, it removes leading paths", () => { expect( getDest(join(process.cwd(), "src/path/name.ts"), "foo/bar", true) - ).toEqual("foo/bar/path/name.ts"); + ).toEqual(join("foo", "bar", "path", "name.ts")); }); it("when stripLeadingPaths is true, it also resolves relative paths", () => { expect( getDest(join(process.cwd(), "../../path/name.ts"), "foo/bar", true) - ).toEqual("foo/bar/path/name.ts"); + ).toEqual(join("foo", "bar", "path", "name.ts")); }); });