Skip to content

feat: comprehensive test suite#1

Open
sliamh11 wants to merge 1 commit into
mainfrom
feat/test-suite
Open

feat: comprehensive test suite#1
sliamh11 wants to merge 1 commit into
mainfrom
feat/test-suite

Conversation

@sliamh11

Copy link
Copy Markdown
Owner

Summary

  • 88 tests across 6 test files covering all 8 MCP tools
  • Trade execution safety gate (CRITICAL): verifies place_order is disabled by default, returns descriptive error (not crash), validates all order parameters when enabled
  • Authentication: auth_status, reauthenticate, gateway-down fallback, competing sessions
  • Market data: get_quote warm-up double-call pattern with 1s delay, search_contract results and empty states
  • Account & positions: ledger parsing, P&L totals computation, rounding to 2 decimal places, empty state
  • Config: Zod validation, required fields, boolean string transforms, URL validation, defaults
  • Client: HTTP error handling, num() edge cases (null, string, NaN), tickle heartbeat lifecycle
  • Runs in ~200ms total — no real network calls, all mocked

Test plan

  • npm test passes: 88/88 tests, ~200ms
  • No flaky tests — all deterministic (fake timers for time-dependent tests)
  • Test structure mirrors source: tests/config.test.ts, tests/ibkr/client.test.ts, tests/tools/*.test.ts
  • Review test coverage for any gaps before merge

🤖 Generated with Claude Code

88 tests covering all 8 MCP tools — trade execution safety gate,
authentication, market data warm-up, account/positions totals,
config validation, and HTTP error handling. Runs in ~200ms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant