Skip to content

Commit 1b221b2

Browse files
committed
fix failing test
1 parent d62f859 commit 1b221b2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

+12-1
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,23 @@ 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();
2738
});
2839

29-
it('returns the svelte config', async () => {
40+
it.only('returns the svelte config', async () => {
3041
const config = await loadSvelteConfig();
3142
expect(config).toStrictEqual({
3243
kit: {

0 commit comments

Comments
 (0)