Description
No *.test.*/*.spec.* file exists anywhere in this repo, no test framework is installed, and .github/workflows/ci.yml only runs lint, typecheck, and build. The highest-risk logic in the codebase — wallet connection/polling (hooks/useAccount.ts), the on-chain event placeholder (hooks/useSubscription.ts), and the API routes that silently fall back to mock data (pages/api/profile.ts, pages/api/usdc-price.ts) — has zero coverage. This is what makes it hard: none of it can be tested without properly mocking the Freighter browser extension API and Soroban RPC responses, which the codebase has no existing pattern for.
Component
Frontend
Difficulty
🔴 Hard
Tasks
Acceptance Criteria
Estimated Time
2-3 days
Description
No
*.test.*/*.spec.*file exists anywhere in this repo, no test framework is installed, and.github/workflows/ci.ymlonly runslint,typecheck, andbuild. The highest-risk logic in the codebase — wallet connection/polling (hooks/useAccount.ts), the on-chain event placeholder (hooks/useSubscription.ts), and the API routes that silently fall back to mock data (pages/api/profile.ts,pages/api/usdc-price.ts) — has zero coverage. This is what makes it hard: none of it can be tested without properly mocking the Freighter browser extension API and Soroban RPC responses, which the codebase has no existing pattern for.Component
Frontend
Difficulty
🔴 Hard
Tasks
@stellar/freighter-api(connect/disconnect/getAddress/signTransaction) so wallet-dependent hooks/components are testable without a real extensionuseAccount.ts(connect, disconnect, switch-account, polling behavior) and the API routes' mock-fallback branchestest/test:coveragescripts intopackage.jsonand add a test step to.github/workflows/ci.ymlAcceptance Criteria
npm testtesting.md) so future contract-integration work can reuse themuseAccount.tsand both API routes have meaningful test coverage (not just snapshot/smoke tests)Estimated Time
2-3 days