Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy authored and astrobot-houston committed Jan 5, 2024
1 parent 22a5405 commit bd3f36e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 9 additions & 5 deletions packages/integrations/vercel/src/static/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
? {
Expand Down
6 changes: 2 additions & 4 deletions packages/integrations/vercel/test/static.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
});
});

0 comments on commit bd3f36e

Please sign in to comment.