Merge branch 'master' into spread_routes

This commit is contained in:
Rich Harris
2019-04-27 13:09:54 -04:00
committed by GitHub
8 changed files with 27 additions and 7 deletions

View File

@@ -0,0 +1,3 @@
<h1>A page</h1>
<a href="dirs/foo/xyz">same segment</a>

View File

@@ -0,0 +1 @@
<h1>B page</h1>

View File

@@ -298,6 +298,17 @@ 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();
assert.equal(await title(), 'A page');
await page.click('[href="dirs/foo/xyz"]');
await wait(50);
assert.equal(await title(), 'B page');
});
it('runs server route handlers before page handlers, if they match', async () => {