Skip to content

Conversation

silverlyra
Copy link

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.

test/index.test.ts:
✓ JWT Plugin > signs and verifies JWTs [9.33ms]

 1 pass
 0 fail
 3 expect() calls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant