Skip to content

Commit

Permalink
fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 1, 2024
1 parent 81101ce commit a7adab9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/src/swc/__tests__/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
});
});

0 comments on commit a7adab9

Please sign in to comment.