Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy committed Dec 4, 2023
1 parent c7e91cc commit acb9f8b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/integrations/vercel/test/redirects.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('Redirects', () => {
destination: '/',
},
'/blog/[...slug]': '/team/articles/[...slug]',
'/Basic/http-2-0.html': '/posts/http2',
},
trailingSlash: 'always',
});
Expand Down Expand Up @@ -45,6 +46,15 @@ describe('Redirects', () => {
expect(threeRoute.status).to.equal(302);
});

it('define static files', async () => {
const config = await getConfig();

const staticRoute = config.routes.find((r) => r.src === '/Basic/http-2-0.html');
expect(staticRoute).to.not.be.undefined;
expect(staticRoute.headers.Location).to.equal('/posts/http2');
expect(staticRoute.status).to.equal(301);
});

it('defines dynamic routes', async () => {
const config = await getConfig();

Expand Down

0 comments on commit acb9f8b

Please sign in to comment.