Skip to content

Commit 5965b7f

Browse files
committed
test(reg-exp-router): remove unnecessary type annotation in test
1 parent 4909093 commit 5965b7f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/router/reg-exp-router/prepared-router.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ describe('PreparedRegExpRouter', async () => {
5353
it('should add a route', () => {
5454
const params = buildInitParams({
5555
paths: ['/hello'],
56-
}) as ConstructorParameters<typeof PreparedRegExpRouter<string>>
57-
const router = new PreparedRegExpRouter<string>(...params)
56+
})
57+
const router = new PreparedRegExpRouter(...params)
5858
router.add('GET', '/hello', 'get hello')
5959
expect(router.match('GET', '/hello')).toEqual([[['get hello', {}]], []])
6060
})
6161

6262
it('should throw an error if the path is not pre-registered', () => {
6363
const params = buildInitParams({
6464
paths: ['/hello'],
65-
}) as ConstructorParameters<typeof PreparedRegExpRouter<string>>
66-
const router = new PreparedRegExpRouter<string>(...params)
65+
})
66+
const router = new PreparedRegExpRouter(...params)
6767
expect(() => router.add('GET', '/unknown', 'get hello')).toThrowError()
6868
})
6969
})

0 commit comments

Comments
 (0)