Skip to content

Commit

Permalink
fix it again
Browse files Browse the repository at this point in the history
  • Loading branch information
tjosepo committed Jul 5, 2024
1 parent 006873b commit 3b635bb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/create-schemas/tests/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ describe.concurrent("utils", () => {
expect(result).toBe("file:///C:/input");
});

test("input as absolute path", ({ expect }) => {
test("input as absolute path", ({ expect, onTestFinished }) => {
vi.spyOn(process, "cwd").mockImplementation(() => "/cwd");
onTestFinished(() => {
vi.resetAllMocks();
});

const input = "/input";

const result = toFullyQualifiedURL(input);

expect(result).toBe("file:///C:/input");
expect(result).toBe("file:///input");
});

test("input as relative path", ({ expect, onTestFinished }) => {
Expand Down

0 comments on commit 3b635bb

Please sign in to comment.