Skip to content

Commit

Permalink
test(router): remove unnecessary async keyword from router tests (#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
K-tecchan authored Jul 1, 2024
1 parent c095dfa commit 94f47ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/router/linear-router/router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/router/reg-exp-router/router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 94f47ec

Please sign in to comment.