Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Jan 4, 2024
1 parent 9fd24a5 commit a1b324b
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions packages/astro/test/units/routing/trailing-slash.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ describe('trailingSlash', () => {
await container.close();
});

it('should match the API route when request has a trailing slash', async () => {
const { req, res, text } = createRequestAndResponse({
method: 'GET',
url: '/api/',
});
container.handle(req, res);
const json = await text();
expect(json).to.equal('{"success":true}');
});
it('should match the API route when request has a trailing slash', async () => {
const { req, res, text } = createRequestAndResponse({
method: 'GET',
url: '/api/',
});
container.handle(req, res);
const json = await text();
expect(json).to.equal('{"success":true}');
});

it('should NOT match the API route when request lacks a trailing slash', async () => {
const { req, res, text } = createRequestAndResponse({
method: 'GET',
url: '/api',
});
container.handle(req, res);
expect(await text()).to.equal('');
expect(res.statusCode).to.equal(404);
});
it('should NOT match the API route when request lacks a trailing slash', async () => {
const { req, res, text } = createRequestAndResponse({
method: 'GET',
url: '/api',
});
container.handle(req, res);
expect(await text()).to.equal('');
expect(res.statusCode).to.equal(404);
});
});

0 comments on commit a1b324b

Please sign in to comment.