test: cover queryXlmBalance, estimateRequiredFee, resolvePassphrase + docs for StreamBuilder.ratePerSecond/submit - #467
Closed
pyper01 wants to merge 1 commit into
Conversation
…document StreamBuilder ratePerSecond/submit Add direct unit tests for three previously uncovered functions (mocked RPC simulation for the balance query, fallback/extraction shapes for the fee estimate, and every branch of the batch passphrase resolver), and document StreamBuilder.ratePerSecond() and submit() in docs/api.md. Closes conduit-protocol#460, conduit-protocol#461, conduit-protocol#462, conduit-protocol#463 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@pyper01 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! 🚀 |
Contributor
|
Thanks for the contribution here — squash-merging this now. Any follow-ups we'll track in a fresh issue. 🚀 |
Jaydbrown
added a commit
that referenced
this pull request
Aug 26, 2026
… StreamBuilder docs (#467) Co-authored-by: pyper01 <pyper01@users.noreply.github.com>
Contributor
|
Merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #460, Closes #461,Closes #462,Closes #463
Adds direct unit tests for three previously uncovered functions and fills the
docs/api.mdgap in the Fluent Builder reference:Test gap: no coverage for queryXlmBalance() (src/soroban.ts) #460 —
queryXlmBalance()(src/soroban.ts): newsrc/tests/soroban-query-xlm-balance.test.tsmocksSorobanRpc.Server'ssimulateTransaction()/getAccount()(via the samevi.hoisted+vi.mock('@stellar/stellar-sdk')pattern used by the existing RPC tests) and asserts the exact stroop value returned for small/zero/64-bit-spanning balances, the simulation-error rejection path, and that the correct account/tx are used for thebalance()call against the native asset contract.Test gap: no coverage for estimateRequiredFee() (src/soroban.ts) #461 —
estimateRequiredFee()(src/soroban.ts): newsrc/tests/soroban-estimate-required-fee.test.tslocks in the5_000_000_000n(~500 XLM) fallback for WasmVm/InvalidAction-shaped error results (the root cause of the overstatement bug called out in the issue), plus theminResourceFee/feeextraction for string/number/bigint shapes, precedence ofminResourceFeeoverfee, skipping of zero/negative values, non-object inputs, and custom fallbacks.Test gap: no coverage for resolvePassphrase() (src/batch-tx.ts) #462 —
resolvePassphrase()(src/batch-tx.ts): newsrc/tests/batch-tx-resolve-passphrase.test.tscovers every branch: explicit passphrase present, explicit-over-network precedence, blank/whitespace-only passphrase falling through, each known named network,BatchBuildErrorfor unknown networks, andBatchBuildErrorwhen neither is provided.Docs: docs/api.md's StreamBuilder reference omits ratePerSecond() and submit() #463 —
docs/api.mdStreamBuilder reference: documents the previously omitted.ratePerSecond(val: number | bigint)and.submit(submitFn, options)methods (including the fullSubmitOptions: retries, backoff, concurrency, queue backpressure,AbortSignal), with usage examples for both.Verification
npm test— 746 passed, 2 skipped (60 files, incl. the 3 new test files: 24 new tests)npm run typecheck— cleanChangelog
CHANGELOG.md updated under
[Unreleased]→Added(test coverage) andDocumentation(StreamBuilder methods).