0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

[ci] format

This commit is contained in:
Arsh 2024-01-05 18:28:59 +00:00 committed by astrobot-houston
parent 22a5405b4a
commit bd3f36e6ab
2 changed files with 11 additions and 9 deletions

View file

@ -125,11 +125,15 @@ export default function vercelStatic({
continue: true, continue: true,
}, },
{ handle: 'filesystem' }, { handle: 'filesystem' },
...routes.find(route => route.pathname === "/404") ? [{ ...(routes.find((route) => route.pathname === '/404')
? [
{
src: `/.*`, src: `/.*`,
dest: `/404.html`, dest: `/404.html`,
status: 404, status: 404,
}] : [], },
]
: []),
], ],
...(imageService || imagesConfig ...(imageService || imagesConfig
? { ? {

View file

@ -13,14 +13,12 @@ describe('maxDuration', () => {
}); });
it('falls back to 404.html', async () => { it('falls back to 404.html', async () => {
const deploymentConfig = JSON.parse( const deploymentConfig = JSON.parse(await fixture.readFile('../.vercel/output/config.json'));
await fixture.readFile('../.vercel/output/config.json')
);
// change the index if necesseary // change the index if necesseary
expect(deploymentConfig.routes[2]).to.deep.include({ expect(deploymentConfig.routes[2]).to.deep.include({
src: '/.*', src: '/.*',
dest: '/404.html', dest: '/404.html',
status: 404 status: 404,
}); });
}); });
}); });