diff --git a/test/apps/basics/src/routes/skipped/[one]/[two].svelte b/test/apps/basics/src/routes/skipped/[one]/[two].svelte
new file mode 100644
index 0000000..31b10d2
--- /dev/null
+++ b/test/apps/basics/src/routes/skipped/[one]/[two].svelte
@@ -0,0 +1,14 @@
+
+
+
+
+
{one}:{two}
+
+y/1
\ No newline at end of file
diff --git a/test/apps/basics/test.ts b/test/apps/basics/test.ts
index 45e02cd..53cced3 100644
--- a/test/apps/basics/test.ts
+++ b/test/apps/basics/test.ts
@@ -282,7 +282,7 @@ describe('basics', function() {
assert.equal(await title(), 'bar');
});
- it('navigates to ...rest', async () => {
+ it('navigates to ...rest', async () => {
await page.goto(`${base}/abc/xyz`);
await start();
@@ -298,8 +298,8 @@ describe('basics', function() {
await page.evaluate(() => document.body.textContent),
'xyz,abc,qwe'
);
- });
-
+ });
+
it('navigates between dynamic routes with same segments', async () => {
await page.goto(`${base}/dirs/bar/xyz`);
await start();
@@ -310,7 +310,7 @@ describe('basics', function() {
await wait(50);
assert.equal(await title(), 'B page');
});
-
+
it('runs server route handlers before page handlers, if they match', async () => {
const json = await get(`${base}/middleware`, {
headers: {
@@ -324,4 +324,18 @@ describe('basics', function() {
assert.ok(html.body.indexOf('HTML
') !== -1);
});
+
+ it('invalidates page when a segment is skipped', async () => {
+ await page.goto(`${base}/skipped/x/1`);
+ await start();
+ await prefetchRoutes();
+
+ await page.click('a[href="skipped/y/1"]');
+ await wait(50);
+
+ assert.equal(
+ await title(),
+ 'y:1'
+ );
+ });
});