Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix tests #37

wants to merge 1 commit into from

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