Skip to content

test(chain-watcher): Add integration tests for Base Sepolia testnet#57

Merged
geminimir merged 2 commits intomainfrom
feature/integration-tests-base-sepolia
Mar 15, 2026
Merged

test(chain-watcher): Add integration tests for Base Sepolia testnet#57
geminimir merged 2 commits intomainfrom
feature/integration-tests-base-sepolia

Conversation

@geminimir
Copy link
Owner

Summary

Add integration tests using Base Sepolia testnet to verify the Chain Watcher can detect real USDC test transfers and handle connection scenarios.

Changes

  • Add integration tests verifying Chain Watcher against Base Sepolia testnet
  • Test RPC connection and USDC contract verification
  • Test ConnectionManager polling and transfer event detection
  • Test polling fallback when WebSocket is unavailable
  • Add BASE_SEPOLIA constants (chain ID, USDC contract address, RPC endpoints)
  • Separate unit tests from integration tests via jest config files
  • Add test:integration npm script for running integration tests

How to Test

  1. npm ci
  2. npm run typecheck
  3. npm test --workspace=@stripeonchain/chain-watcher (unit tests)
  4. npm run test:integration --workspace=@stripeonchain/chain-watcher (integration tests)

Tests

  • Tests added/updated (8 new integration tests)
  • All tests pass (npm test - 39 unit tests)
  • Integration tests pass (npm run test:integration - 8 tests)
  • Lint passes (npm run lint)
  • Type-check passes (npm run typecheck for chain-watcher)
  • Formatting passes (npm run format:check)

Checklist

  • No secrets or credentials committed
  • Migrations run cleanly up and down (npm run migrate:up / npm run migrate:down)
  • Docker Compose starts without errors (docker compose up)

Related Issues

Closes #17

Made with Cursor

- Add integration tests verifying Chain Watcher against Base Sepolia
- Test RPC connection and USDC contract verification
- Test ConnectionManager polling and transfer detection
- Test polling fallback when WebSocket unavailable
- Add BASE_SEPOLIA constants (chain ID, USDC contract, RPC endpoints)
- Separate unit tests from integration tests via jest configs
- Add test:integration npm script

Closes #17

Made-with: Cursor
Fixes CI failure by adding integration config to ESLint ignorePatterns
instead of modifying tsconfig includes which conflicts with rootDir.

Made-with: Cursor
@geminimir geminimir merged commit 15cea63 into main Mar 15, 2026
1 check passed
@geminimir geminimir deleted the feature/integration-tests-base-sepolia branch March 15, 2026 15:19
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.

Integration tests: Chain Watcher with Base Sepolia testnet

1 participant