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:
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,
},
{ handle: 'filesystem' },
...routes.find(route => route.pathname === "/404") ? [{
src: `/.*`,
dest: `/404.html`,
status: 404,
}] : [],
...(routes.find((route) => route.pathname === '/404')
? [
{
src: `/.*`,
dest: `/404.html`,
status: 404,
},
]
: []),
],
...(imageService || imagesConfig
? {

View file

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