0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -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

@ -58,7 +58,7 @@ export function createServer(
stream.on('directory', () => { stream.on('directory', () => {
// On directory find, redirect to the trailing slash // On directory find, redirect to the trailing slash
const location = req.url + '/'; const location = req.url + '/';
res.statusCode = 301 res.statusCode = 301;
res.setHeader('Location', location); res.setHeader('Location', location);
res.end(location); res.end(location);
}); });

View file

@ -61,7 +61,7 @@ describe('Prerendering', () => {
it('Omitting the trailing slash results in a redirect that includes the base', async () => { 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`, { const res = await fetch(`http://${server.host}:${server.port}/some-base/two`, {
redirect: 'manual' redirect: 'manual',
}); });
expect(res.status).to.equal(301); expect(res.status).to.equal(301);
expect(res.headers.get('location')).to.equal('/some-base/two/'); expect(res.headers.get('location')).to.equal('/some-base/two/');