0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00

test(router): remove unnecessary async keyword from router tests (#3061)

This commit is contained in:
K-tecchan 2024-07-01 09:52:33 +09:00 committed by GitHub
parent c095dfac4e
commit 94f47ec2e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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<string>()
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)