Skip to content

[Testing] frontend/src/app/hooks/useReveal.ts has no test coverage #1518

Description

@grantfox-oss

Join our community: https://t.me/+DOylgFv1jyJlNzM0

Why this matters
useReveal.ts backs the PII reveal flow paired with frontend/src/app/api/recipients/[id]/reveal/route.ts, a security sensitive path, but there is no hooks test file for it despite sibling hooks like useApi and useSSE having dedicated tests.

Acceptance criteria

  • Add a test file for useReveal.ts covering the success path, an expired or denied reveal response, and error handling
  • Assert the hook does not cache or leak revealed PII beyond its intended scope

Files to touch

  • frontend/src/app/hooks/useReveal.ts
  • frontend/src/app/hooks/useReveal.test.ts

Out of scope
Changing the reveal API contract.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programfrontendIssues related to frontend developmenttestingAdding or fixing tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions