diff options
author | 2022-07-29 20:56:25 +0000 | |
---|---|---|
committer | 2022-07-29 20:56:25 +0000 | |
commit | 2ac5c557cf3736499a8876319e977c2af950026d (patch) | |
tree | 10297fa60bff086758c63ccc5831a4712d950175 /packages/astro/test/routing-priority.test.js | |
parent | a0d1731a7ea9c31c5285b8b7239b2e1e558c1028 (diff) | |
download | astro-2ac5c557cf3736499a8876319e977c2af950026d.tar.gz astro-2ac5c557cf3736499a8876319e977c2af950026d.tar.zst astro-2ac5c557cf3736499a8876319e977c2af950026d.zip |
[ci] format
Diffstat (limited to '')
-rw-r--r-- | packages/astro/test/routing-priority.test.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/astro/test/routing-priority.test.js b/packages/astro/test/routing-priority.test.js index ca093fd5c..359b6981e 100644 --- a/packages/astro/test/routing-priority.test.js +++ b/packages/astro/test/routing-priority.test.js @@ -76,25 +76,25 @@ const routes = [ { description: 'matches /injected to to-inject.astro', url: '/injected', - h1: 'to-inject.astro' + h1: 'to-inject.astro', }, { description: 'matches /_injected to to-inject.astro', url: '/_injected', - h1: 'to-inject.astro' + h1: 'to-inject.astro', }, { description: 'matches /injected-1 to [id].astro', url: '/injected-1', h1: '[id].astro', - p: 'injected-1' + p: 'injected-1', }, { description: 'matches /injected-2 to [id].astro', url: '/injected-2', h1: '[id].astro', - p: 'injected-2' - } + p: 'injected-2', + }, ]; function appendForwardSlash(path) { @@ -147,7 +147,7 @@ describe('Routing priority', () => { it(description, async () => { const html = await fixture.fetch(url).then((res) => res.text()); const $ = cheerioLoad(html); - + expect($('h1').text()).to.equal(h1); if (p) { @@ -159,7 +159,7 @@ describe('Routing priority', () => { it(`${description} (trailing slash)`, async () => { const html = await fixture.fetch(appendForwardSlash(url)).then((res) => res.text()); const $ = cheerioLoad(html); - + expect($('h1').text()).to.equal(h1); if (p) { @@ -169,9 +169,11 @@ describe('Routing priority', () => { // checks with index.html, ex: '/de/index.html' instead of '/de' it(`${description} (index.html)`, async () => { - const html = await fixture.fetch(`${appendForwardSlash(url)}index.html`).then((res) => res.text()); + const html = await fixture + .fetch(`${appendForwardSlash(url)}index.html`) + .then((res) => res.text()); const $ = cheerioLoad(html); - + expect($('h1').text()).to.equal(h1); if (p) { |