Skip to content

Commit 09891d8

Browse files
committed
fix failing test
1 parent 9a6ca1b commit 09891d8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/sveltekit/test/vite/svelteConfig.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ describe('loadSvelteConfig', () => {
2121
};
2222
});
2323

24+
// url apparently doesn't exist in the test environment, therefore we mock it:
25+
vi.mock('url', () => {
26+
return {
27+
pathToFileURL: path => {
28+
return {
29+
href: path,
30+
};
31+
},
32+
};
33+
});
34+
2435
beforeEach(() => {
2536
existsFile = true;
2637
vi.clearAllMocks();

0 commit comments

Comments
 (0)