Problem
There are only 8 test files under test/ for roughly 114 source modules in src/. Several core pages have no tests at all: ContractPage, EventPage, GraphPage, Sandbox, BatchMultiCall, RpcMetricsDashboard, RateLimitDashboard, and SubInvocationPage. Meaningfully closing this gap is a broad, multi-file effort spanning a new test file per page, shared mocking of the API client, and coverage wiring.
What needs to be done
- Add Testing Library tests for each untested page listed above, mocking the API client: cover initial render, loading state, successful data render, and error state.
- Add tests for critical utilities in
src/utils (formatting, XDR helpers) that currently lack coverage.
- Ensure the shared API client is exported/mockable to support these tests.
- Wire coverage thresholds so the added coverage is enforced (coordinate with the coverage-provider issue).
Files
- new test files under
test/ (one per page listed above)
- new tests for
src/utils/*
src/services/apiClient.ts (export for mocking, if needed)
vitest.config.ts (coverage thresholds)
Acceptance deliverables
- Each listed page has at least render, loading, and error tests.
- Test count meaningfully increases and
npm test passes.
- All CI checks pass; the change cannot be merged until CI is green.
Tests to pass
- The new page and utility tests pass in CI.
- Coverage does not regress below the configured threshold.
Problem
There are only 8 test files under
test/for roughly 114 source modules insrc/. Several core pages have no tests at all:ContractPage,EventPage,GraphPage,Sandbox,BatchMultiCall,RpcMetricsDashboard,RateLimitDashboard, andSubInvocationPage. Meaningfully closing this gap is a broad, multi-file effort spanning a new test file per page, shared mocking of the API client, and coverage wiring.What needs to be done
src/utils(formatting, XDR helpers) that currently lack coverage.Files
test/(one per page listed above)src/utils/*src/services/apiClient.ts(export for mocking, if needed)vitest.config.ts(coverage thresholds)Acceptance deliverables
npm testpasses.Tests to pass