diff options
author | 2022-07-26 08:54:49 -0400 | |
---|---|---|
committer | 2022-07-26 08:54:49 -0400 | |
commit | 453c026aa7f7825516e5816efc443fd9b0b6d74a (patch) | |
tree | 5b06311d185cfc2bacc0084f540b78e91037adae /packages/astro/test/routing-priority.test.js | |
parent | adf8cde10fc86705935ba9ec4644fc9ecc1657b1 (diff) | |
download | astro-453c026aa7f7825516e5816efc443fd9b0b6d74a.tar.gz astro-453c026aa7f7825516e5816efc443fd9b0b6d74a.tar.zst astro-453c026aa7f7825516e5816efc443fd9b0b6d74a.zip |
Move getStaticPaths call to happen during generation (#4047)
* Move getStaticPaths call to happen during generation
* Adds a changeset
* Update routing-priority.test.js
* revert test change, clarify test purpose
* Keep track of paths that have already been built
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | packages/astro/test/routing-priority.test.js | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/packages/astro/test/routing-priority.test.js b/packages/astro/test/routing-priority.test.js index 097ef1f8b..ef2daf006 100644 --- a/packages/astro/test/routing-priority.test.js +++ b/packages/astro/test/routing-priority.test.js @@ -103,7 +103,7 @@ describe('Routing priority', () => { const html = await fixture.readFile('/de/index.html'); const $ = cheerioLoad(html); - expect($('h1').text()).to.equal('de/index.astro'); + expect($('h1').text()).to.equal('de/index.astro (priority)'); }); it('matches /en to [lang]/index.astro', async () => { @@ -169,28 +169,24 @@ describe('Routing priority', () => { const html = await fixture.fetch('/de').then((res) => res.text()); const $ = cheerioLoad(html); - expect($('h1').text()).to.equal('de/index.astro'); - }); - - it('matches /de to de/index.astro', async () => { - const html = await fixture.fetch('/de').then((res) => res.text()); - const $ = cheerioLoad(html); - - expect($('h1').text()).to.equal('de/index.astro'); + expect($('h1').text()).to.equal('de/index.astro (priority)'); + expect($('p').text()).to.equal('de'); }); it('matches /de/ to de/index.astro', async () => { const html = await fixture.fetch('/de/').then((res) => res.text()); const $ = cheerioLoad(html); - expect($('h1').text()).to.equal('de/index.astro'); + expect($('h1').text()).to.equal('de/index.astro (priority)'); + expect($('p').text()).to.equal('de'); }); it('matches /de/index.html to de/index.astro', async () => { const html = await fixture.fetch('/de/index.html').then((res) => res.text()); const $ = cheerioLoad(html); - expect($('h1').text()).to.equal('de/index.astro'); + expect($('h1').text()).to.equal('de/index.astro (priority)'); + expect($('p').text()).to.equal('de'); }); it('matches /en to [lang]/index.astro', async () => { |