Skip to content

[Test] horizonAccount.ts has no test file #658

Description

@collinsezedike

Description

No horizonAccount.test.ts exists in apps/web/src/__tests__/lib/ (only wallet.test.ts and lobstr-wallet.test.ts are present). fetchBalances (apps/web/src/lib/horizonAccount.ts:9) returns null when the Horizon response isn't ok, and horizonUrlFor's mainnet/testnet branch (lines 1-5) is also untested.

Acceptance Criteria

  • A new test mocks fetch to return a non-ok response and asserts fetchBalances resolves to null rather than throwing.
  • A test asserts horizonUrlFor("mainnet") returns the Horizon mainnet URL and any other value returns the testnet URL.
  • pnpm test (apps/web package) passes.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programchoreBuild, CI, dependency updates, or repository maintenancefrontendInvolves React components, Tailwind styling, or Next.js pagestestingAdds or improves test coverage (unit, integration, or e2e)trivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions