Skip to content

fix: mock chain provider gas estimation in backend tests - #100

Merged
mikaelbjorn merged 1 commit into
mainfrom
fix/backend-test-provider-mocks
Aug 21, 2026
Merged

fix: mock chain provider gas estimation in backend tests#100
mikaelbjorn merged 1 commit into
mainfrom
fix/backend-test-provider-mocks

Conversation

@mikaelbjorn

Copy link
Copy Markdown
Contributor

Summary

Adds the missing getProvider().estimateGas() mocks to backend tests that mock the chain provider.

The production code now performs gas estimation through the chain provider, but several existing tests only mocked getContract(). This allowed the tests to fall through into provider behaviour that should not be exercised by unit and integration fixtures.

The updated mocks return a deterministic gas estimate of 100000n.

Scope

Test fixtures only. No production execution logic is changed.

Updated coverage includes:

  • demo flow
  • route integration tests
  • liquid staking claim/enter/exit preparation
  • swap preparation
  • Aerodrome service tests

Verification

  • npm ci: passed
  • backend test suite: passed
  • TypeScript build: passed
  • git diff --check: passed
  • working tree clean

@mikaelbjorn
mikaelbjorn merged commit 148daef into main Aug 21, 2026
1 check passed
@mikaelbjorn
mikaelbjorn deleted the fix/backend-test-provider-mocks branch August 21, 2026 15:15
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