Description
The SDK lacks an end-to-end smoke test suite that exercises the full happy-path flow — create invoice, preflight check, submit payment, verify receipt, check finality — against Stellar testnet using real Horizon calls and funded test accounts. Without this harness, regressions in Horizon API compatibility, @stellar/stellar-sdk upgrades, or cross-module integration are only caught in production. A smoke test harness should run this flow as a CI-gated integration test.
Technical Context
Add tests/integration/smokeTest.ts. Uses @stellar/stellar-sdk Keypair.random() and the testnet faucet endpoint (https://friendbot.stellar.org) to fund test accounts. Calls StellarSplitClient from src/client.ts with a testnet config. Invokes createInvoice(), preflightCheck(), submitPayment(), getReceipt(), and FinalityChecker.check(). Asserts each step returns the expected typed result. Controlled by STELLAR_TESTNET_SMOKE=1 environment variable to avoid running on every unit test pass.
Acceptance Criteria
Description
The SDK lacks an end-to-end smoke test suite that exercises the full happy-path flow — create invoice, preflight check, submit payment, verify receipt, check finality — against Stellar testnet using real Horizon calls and funded test accounts. Without this harness, regressions in Horizon API compatibility,
@stellar/stellar-sdkupgrades, or cross-module integration are only caught in production. A smoke test harness should run this flow as a CI-gated integration test.Technical Context
Add
tests/integration/smokeTest.ts. Uses@stellar/stellar-sdkKeypair.random()and the testnet faucet endpoint (https://friendbot.stellar.org) to fund test accounts. CallsStellarSplitClientfromsrc/client.tswith a testnet config. InvokescreateInvoice(),preflightCheck(),submitPayment(),getReceipt(), andFinalityChecker.check(). Asserts each step returns the expected typed result. Controlled bySTELLAR_TESTNET_SMOKE=1environment variable to avoid running on every unit test pass.Acceptance Criteria
StellarSplitClient.preflightCheck()and asserts all preflight checks pass before submissionFinalityChecker.check()withminConfirmations: 2PaymentReceipt.status === 'finalized'andeffectSummaryreflects the correct balance deltas for both recipientsSTELLAR_TESTNET_SMOKEis not set and is explicitly tagged as@integrationto exclude from the defaultnpm testrun