diff options
author | 2024-01-25 10:24:46 +0000 | |
---|---|---|
committer | 2024-01-25 10:24:46 +0000 | |
commit | 9248f540338de9bbea3dfdbe65f7148fe2e4eb14 (patch) | |
tree | 370019dfef4ba4153510b2866bdaa1ca68f69f91 /packages/integrations/node/test/trailing-slash.js | |
parent | f7f19bfa5b6b8d41a7ba3884d455961e817ec676 (diff) | |
download | astro-9248f540338de9bbea3dfdbe65f7148fe2e4eb14.tar.gz astro-9248f540338de9bbea3dfdbe65f7148fe2e4eb14.tar.zst astro-9248f540338de9bbea3dfdbe65f7148fe2e4eb14.zip |
[ci] format
Diffstat (limited to 'packages/integrations/node/test/trailing-slash.js')
-rw-r--r-- | packages/integrations/node/test/trailing-slash.js | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/packages/integrations/node/test/trailing-slash.js b/packages/integrations/node/test/trailing-slash.js index cdfef6d10..c46945b5a 100644 --- a/packages/integrations/node/test/trailing-slash.js +++ b/packages/integrations/node/test/trailing-slash.js @@ -8,7 +8,9 @@ import * as cheerio from 'cheerio'; */ async function load() { - const mod = await import(`./fixtures/trailing-slash/dist/server/entry.mjs?dropcache=${Date.now()}`); + const mod = await import( + `./fixtures/trailing-slash/dist/server/entry.mjs?dropcache=${Date.now()}` + ); return mod; } @@ -52,7 +54,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/some-base/one/'); @@ -60,7 +62,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect and query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/some-base/one/?foo=bar'); @@ -109,7 +111,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect', async () => { const res = await fetch(`http://${server.host}:${server.port}/one`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/one/'); @@ -117,7 +119,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect and query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/one?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/one/?foo=bar'); @@ -169,7 +171,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one/`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/some-base/one'); @@ -177,7 +179,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect and query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one/?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); @@ -227,7 +229,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect', async () => { const res = await fetch(`http://${server.host}:${server.port}/one/`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/one'); @@ -235,7 +237,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with redirect and query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/one/?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); @@ -288,7 +290,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with slash', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one/`, { - redirect : 'manual' + redirect: 'manual', }); const html = await res.text(); const $ = cheerio.load(html); @@ -299,7 +301,7 @@ describe('Trailing slash', () => { it('Can render prerendered route without slash', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one`, { - redirect : 'manual' + redirect: 'manual', }); const html = await res.text(); const $ = cheerio.load(html); @@ -310,7 +312,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with slash and query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one/?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); const html = await res.text(); const $ = cheerio.load(html); @@ -321,7 +323,7 @@ describe('Trailing slash', () => { it('Can render prerendered route without slash and with query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/one?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); const html = await res.text(); const $ = cheerio.load(html); @@ -382,7 +384,7 @@ describe('Trailing slash', () => { it('Can render prerendered route with slash and query params', async () => { const res = await fetch(`http://${server.host}:${server.port}/one/?foo=bar`, { - redirect : 'manual' + redirect: 'manual', }); const html = await res.text(); const $ = cheerio.load(html); @@ -402,4 +404,3 @@ describe('Trailing slash', () => { }); }); }); - |