Skip to content

test: add specs for ttl-cache, users controller, remaining controllers and jwt strategy - #710

Merged
chonilius merged 1 commit into
MergeFi:mainfrom
edevlopa:fix/edevlopa-ttl-cache-user-ctrl-specs
Oct 20, 2026
Merged

chonilius merged 1 commit into
MergeFi:mainfrom
edevlopa:fix/edevlopa-ttl-cache-user-ctrl-specs

Conversation

@edevlopa

@edevlopa edevlopa commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR resolves the 4 issues assigned to @edevlopa:

  1. TTL Cache Spec: Added unit tests in src/analytics/ttl-cache.spec.ts covering TTL expiration with fake timers, request coalescing for concurrent misses, and invalidation while loads are in flight.
  2. Users Controller Spec: Added src/users/users.controller.spec.ts asserting route and guard behavior, self-only protection on Stellar address updates (throwing 403 when updating another user), and public user DTO shape.
  3. Controller Specs & Validation Fix: Added unit specs for maintenance-pool.controller.spec.ts, sponsors.controller.spec.ts, reputation.controller.spec.ts, and analytics.controller.spec.ts, and resolved the broken validatePage merge conflict in sponsors.controller.ts.
  4. JWT Strategy Spec: Added src/auth/strategies/jwt.strategy.spec.ts covering Bearer vs cookie precedence, malformed cookie handling, missing sub validation, and 401 on deleted users.

Closes #599
Closes #597
Closes #596
Closes #593

@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@edevlopa is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@edevlopa 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! 🚀

Learn more about application limits

@chonilius
chonilius merged commit 324c595 into MergeFi:main Oct 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants