Skip to content

fix: make unit tests deterministic and skip API-dependent tests without credentials - #51

Open
fepvenancio wants to merge 1 commit into
Railgun-Community:mainfrom
fepvenancio:fix/test-determinism
Open

fix: make unit tests deterministic and skip API-dependent tests without credentials#51
fepvenancio wants to merge 1 commit into
Railgun-Community:mainfrom
fepvenancio:fix/test-determinism

Conversation

@fepvenancio

Copy link
Copy Markdown

Summary

  • Stub kLast and feeTo in liquidity recipe tests to eliminate live RPC
    dependency — these were the only unstubbed contract methods, causing test
    failures when on-chain state changed
  • Skip zero-x-v2-quote tests when ZERO_X_API_KEY / PROXY_API_DOMAIN
    aren't configured (matches v1 test pattern)

What changed

  • No production code changes
  • No new mock data or math — just completed existing stub pattern with
    0n/ZERO_ADDRESS (no LP protocol fee)
  • Added this.skip() guards for API-dependent tests

Test plan

  • yarn test → 81 passing, 21 pending, 0 failing

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