Skip to content

test: add horizonAccount.ts coverage - #670

Open
DevTobis wants to merge 1 commit into
drydocs:mainfrom
DevTobis:test/658-horizon-account-tests
Open

test: add horizonAccount.ts coverage#670
DevTobis wants to merge 1 commit into
drydocs:mainfrom
DevTobis:test/658-horizon-account-tests

Conversation

@DevTobis

Copy link
Copy Markdown

closes #658

Summary

Adds apps/web/src/__tests__/lib/horizonAccount.test.ts, covering the two untested paths flagged in the issue.

Changes

  • fetchBalances resolving to null when the Horizon response isn't ok (mocked fetch)
  • fetchBalances resolving to the parsed balances on a successful response
  • horizonUrlFor("mainnet") returning the Horizon mainnet URL, and any other value returning the testnet URL

Verification

pnpm --filter=web test — 17 files / 94 tests passed.

Cover fetchBalances resolving to null on a non-ok Horizon response, and
horizonUrlFor's mainnet/testnet branch.
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@DevTobis 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

@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@DevTobis is attempting to deploy a commit to the Collins' projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test] horizonAccount.ts has no test file

1 participant