Skip to main content

Test matrix

Full workspace

CommandCoverage
pnpm testbigint compatibility, TxLINE ground truth, SDK, keeper, web, and real Surfpool lifecycle.
pnpm typecheckSDK build/types, keeper, program TypeScript tests, and web.
pnpm lintNext.js web source.
pnpm buildSDK production output and optimized Next.js build.

Rust

cargo fmt --check --manifest-path program/programs/slip/Cargo.toml
cargo test --manifest-path program/programs/slip/Cargo.toml --lib
The five Rust tests cover the program ID, R1 stat-leaf golden value, expression arithmetic, terminal phase allowlist, and canonical stat-key metadata.

Surfpool

pnpm --filter @slip/program test:surfpool
The suite builds the actual SBF, deploys it into an offline Surfpool network, creates a real six-decimal SPL mint and token accounts, and executes the public SDK’s create, buy, resolve, claim, and void transaction methods without monkey-patching. Covered scenarios:
  1. Reject a non-contiguous outcome partition.
  2. Reject a stat-key and side mismatch.
  3. Create a five-band total-corners market.
  4. Create a three-outcome 1X2 market.
  5. Buy different stake amounts from two funded wallets.
  6. Assert vault balance equals total pools.
  7. Reject a buy after entry closes.
  8. Resolve using a terminal two-stat proof anchored in a TxLINE-owned roots PDA fixture.
  9. Assert winning outcome and market state.
  10. Assert exact fee and resolver-tip balances.
  11. Reject a losing claim.
  12. Pay the hand-calculated proportional winner amount.
  13. Reject a second claim.
  14. Represent Draw / Not draw with multiple bands pointing to one outcome.
  15. Void and refund a one-sided book.
  16. Void a two-sided unresolved book after timeout and refund both tickets.

SDK

The default SDK suite covers semantic AI-output compilation, every expression operation, period prefixes, five named outcomes, unsupported-output rejection, complete partitions, UTF-8 label limits, program fee/tip parity, IDs, timestamps, exact money math, zero liquidity, large u64-safe values, and instruction accounts. Real model and TxLINE calls are separate credential-gated commands:
pnpm --filter @slip/sdk test:ai
pnpm --filter @slip/sdk test:txline
test:ai requires SLIP_RULE_PROVIDER and SLIP_RULE_MODEL; gateway mode additionally requires AI_GATEWAY_API_KEY. test:ai:ollama targets OLLAMA_BASE_URL and sends real natural-language requests. test:txline requires TXLINE_DEVNET_ORIGIN and an activated TXLINE_API_TOKEN. These commands fail when their real boundaries are absent rather than substituting a model or HTTP fixture.

Keeper and web

Keeper tests cover terminal-priority policy, unknown TxLINE status, durable retry persistence, and HTTP readiness. Web tests cover fixture orientation, token amount parsing, market projection, proportional payouts, the Framework Kit transaction boundary, AI compile API discovery, public routes, pagination, and CORS. The devnet web integration is intentionally gated until the public program is upgraded. It fails with a precise blocker instead of validating legacy accounts as unified markets.