Skip to content

Commit 7c568ba

Browse files
committed
failing test for #3935
1 parent 62789e4 commit 7c568ba

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/kit/test/apps/basics/src/routes/routing/index.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<a href="/routing/a">a</a>
88
<a href="/routing/ambiguous/ok.json" rel="external">ok</a>
99
<a href="http://localhost:{$page.url.searchParams.get('port')}">elsewhere</a>
10+
<a href="/static.json">static.json</a>
1011

1112
<div class="hydrate-test" />

packages/kit/test/apps/basics/test/test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,15 @@ test.describe.parallel('Routing', () => {
20992099
await page.goto('/routing/rest/complex/prefix-one/two/three');
21002100
expect(await page.textContent('h1')).toBe('parts: one/two/three');
21012101
});
2102+
2103+
test('links to unmatched routes result in a full page navigation, not a 404', async ({
2104+
page,
2105+
clicknav
2106+
}) => {
2107+
await page.goto('/routing');
2108+
await clicknav('[href="/static.json"]');
2109+
expect(await page.textContent('body')).toBe('"static file"\n');
2110+
});
21022111
});
21032112

21042113
test.describe.parallel('Session', () => {

0 commit comments

Comments
 (0)