From 94f47ec2e63c5514cd4d6cab2d2129399cac3ea6 Mon Sep 17 00:00:00 2001 From: K-tecchan <67850755+K-tecchan@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:52:33 +0900 Subject: [PATCH] test(router): remove unnecessary async keyword from router tests (#3061) --- src/router/linear-router/router.test.ts | 2 +- src/router/reg-exp-router/router.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/linear-router/router.test.ts b/src/router/linear-router/router.test.ts index 4232ce63..fdd95aaa 100644 --- a/src/router/linear-router/router.test.ts +++ b/src/router/linear-router/router.test.ts @@ -27,7 +27,7 @@ describe('LinearRouter', () => { router.add('GET', '/entry/:id/:action', 'action') }) - it('GET /entry/123/show', async () => { + it('GET /entry/123/show', () => { expect(() => { router.match('GET', '/entry/123/show') }).toThrowError(UnsupportedPathError) diff --git a/src/router/reg-exp-router/router.test.ts b/src/router/reg-exp-router/router.test.ts index 3e5413b7..19999af9 100644 --- a/src/router/reg-exp-router/router.test.ts +++ b/src/router/reg-exp-router/router.test.ts @@ -23,7 +23,7 @@ describe('RegExpRouter', () => { }) describe('Return value type', () => { - it('Should return [[T, ParamIndexMap][], ParamStash]', async () => { + it('Should return [[T, ParamIndexMap][], ParamStash]', () => { const router = new RegExpRouter() router.add('GET', '/posts/:id', 'get post') @@ -42,7 +42,7 @@ describe('RegExpRouter', () => { router.add('GET', '/entry/:name', 'get entry') router.add('POST', '/entry', 'create entry') - it('GET /entry/entries', async () => { + it('GET /entry/entries', () => { expect(() => { router.match('GET', '/entry/entries') }).toThrowError(UnsupportedPathError) @@ -56,7 +56,7 @@ describe('RegExpRouter', () => { router.add('GET', '/:class/:id', ':class') router.add('GET', '/:model/:id', ':model') - it('GET /entry/123', async () => { + it('GET /entry/123', () => { expect(() => { router.match('GET', '/entry/123') }).toThrowError(UnsupportedPathError)