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-04 11:00:47 +00:00 committed by astrobot-houston
parent 9fd24a546c
commit a1b324b31b

View file

@ -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);
});
});