The index.test.ts file appears to test this package, but it does not currently call jwt.sign or jwt.verify! The test app is never used, and assertions are being run on the test Requests, not any Responses returned from the test app.
This adds the missing await app.handle(…) calls, and fixes other issues in the app and test definitions.
I also included a new case – an otherwise-valid JWT generated with a different secret, to make sure that fails verification.
The
index.test.ts
file appears to test this package, but it does not currently calljwt.sign
orjwt.verify
! The testapp
is never used, and assertions are being run on the testRequest
s, not anyResponse
s returned from the test app.This adds the missing
await app.handle(…)
calls, and fixes other issues in the app and test definitions.I also included a new case – an otherwise-valid JWT generated with a different
secret
, to make sure that fails verification.