summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/test/units/routing/trailing-slash.test.js36
1 files changed, 18 insertions, 18 deletions
diff --git a/packages/astro/test/units/routing/trailing-slash.test.js b/packages/astro/test/units/routing/trailing-slash.test.js
index c707c7215..72eed92dd 100644
--- a/packages/astro/test/units/routing/trailing-slash.test.js
+++ b/packages/astro/test/units/routing/trailing-slash.test.js
@@ -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);
+ });
});