Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed May 12, 2023
1 parent 781f558 commit b064ca6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/integrations/node/src/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/node/test/prerender.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/');
Expand Down

0 comments on commit b064ca6

Please sign in to comment.