[TESTING] Add integration test for expired JWT token rejection - #195
Conversation
|
@MissBlue00 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Hi @MissBlue00! 👋 Conflict Summary & Action Required: Rebase Steps: git fetch origin dev
git checkout feature/issue-170-expired-jwt-test
git rebase origin/dev
# Reconcile tests/integration/auth-jwt-validation.test.ts by appending your describe block:
git add tests/integration/auth-jwt-validation.test.ts
git rebase --continue
npm test
git push --force-with-lease origin feature/issue-170-expired-jwt-testOnce clean, we will review and merge into |
|
Hi @MissBlue00! 👋 Here is a detailed breakdown of the conflict in your PR and the exact code changes needed to resolve it: 📌 File in Conflict
🔍 Root Cause & Conflict DetailsBoth
🛠️ Step-by-Step Resolution
Thanks! 🚀 |
Combine expired JWT token rejection test with upstream dev version. Keeps upstream's createTestApp() infrastructure while adding expired token, valid token, and missing token test cases. Closes StellarState#170
|
@chizzy192 the conflict has been resolved |
Closes #170
Summary
Adds integration test in
tests/integration/auth-jwt-validation.test.tsthat verifies expired JWT tokens are rejected with 401 Unauthorized.Implementation Details
jwt.sign(payload, secret, { expiresIn: "-5m" })GET /api/v1/invoiceswith expired token returns 401tests/invoice.routes.test.tsTesting
All 46 integration tests pass.