-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Background
The estimate_same_chain_swap tests currently live inside tests/server.test.ts alongside general server tests (initialization, tool listing, search_tokens, get_supported_chains). They already use mocked fetch with JSON fixtures from tests/fixtures/live-api/. However, create_tx (cross-chain swaps) has no test coverage at all.
Goals
- Add
create_txintegration tests — cover the cross-chain swap tool with mocked fixtures, similar to how estimate_same_chain_swap is tested today:
- ETH→USDC cross-chain (e.g. Ethereum → Arbitrum)
- Stablecoin cross-chain (e.g. USDC on Polygon → USDC on BNB Chain)
- Solana as source or destination chain
- Error case: invalid/missing required params
- Error case: unsupported chain pair - Extract tool-specific tests to separate files:
-tests/estimate-same-chain-swap.test.ts— all estimate_same_chain_swap tests (currently in server.test.ts)
-tests/create-tx.test.ts— newcreate_txtests
-tests/server.test.ts— keep only general/clean server tests (init, tool listing, get_instructions, search_tokens, get_supported_chains) - Re-organize fixtures for clarity:
-tests/fixtures/live-api/estimation/— same-chain estimation fixtures
-tests/fixtures/live-api/create-tx/— cross-chain create-tx fixtures - Extract shared setupClient helper to a reusable module (e.g.
tests/setup-client.ts) to avoid duplication across test files.
Acceptance criteria
create_txtool has integration tests with mocked fetch and fixture files captured from live APIestimate_same_chain_swaptests moved out ofserver.test.tsinto their own file- Fixture files reorganized into subdirectories by tool
setupClientextracted and shared across test files- All existing tests continue to pass
npm testruns without network calls (except tests explicitly opted in via env var)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers