treat foo.html and foo/index.html the same when generating manifest

This commit is contained in:
Richard Harris
2019-02-04 07:42:45 -05:00
parent 96b9d19715
commit 720cf8a859
4 changed files with 27 additions and 16 deletions

View File

@@ -0,0 +1 @@
<h1>bar</h1>

View File

@@ -0,0 +1,2 @@
<h1>foo</h1>
<a href="dirs/bar">bar</a>

View File

@@ -264,4 +264,15 @@ describe('basics', function() {
const html = String(await page.evaluate(() => document.body.innerHTML));
assert.equal(html.indexOf('%sapper'), -1);
});
it('navigates between routes with empty parts', async () => {
await page.goto(`${base}/dirs/foo`);
await start();
assert.equal(await title(), 'foo');
await page.click('[href="dirs/bar"]');
await wait(50);
assert.equal(await title(), 'bar');
});
});