From b064ca6539522ecf0ba476ef9de75a8d113bec0c Mon Sep 17 00:00:00 2001 From: matthewp Date: Fri, 12 May 2023 14:03:42 +0000 Subject: [PATCH] [ci] format --- packages/integrations/node/src/http-server.ts | 8 ++++---- packages/integrations/node/test/prerender.test.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/integrations/node/src/http-server.ts b/packages/integrations/node/src/http-server.ts index 2c58c0da7..177c71ed9 100644 --- a/packages/integrations/node/src/http-server.ts +++ b/packages/integrations/node/src/http-server.ts @@ -57,10 +57,10 @@ export function createServer( }); stream.on('directory', () => { // On directory find, redirect to the trailing slash - const location = req.url + '/'; - res.statusCode = 301 - res.setHeader('Location', location); - res.end(location); + const location = req.url + '/'; + res.statusCode = 301; + res.setHeader('Location', location); + res.end(location); }); stream.on('file', () => { forwardError = true; diff --git a/packages/integrations/node/test/prerender.test.js b/packages/integrations/node/test/prerender.test.js index 1b478bb33..0ef316ed6 100644 --- a/packages/integrations/node/test/prerender.test.js +++ b/packages/integrations/node/test/prerender.test.js @@ -61,7 +61,7 @@ describe('Prerendering', () => { it('Omitting the trailing slash results in a redirect that includes the base', async () => { const res = await fetch(`http://${server.host}:${server.port}/some-base/two`, { - redirect: 'manual' + redirect: 'manual', }); expect(res.status).to.equal(301); expect(res.headers.get('location')).to.equal('/some-base/two/');