0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
matthewp 2023-05-12 14:03:42 +00:00 committed by fredkbot
parent 781f558c40
commit b064ca6539
2 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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/');