walletConnectors lib has no tests: connector adapters are uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
src/lib/walletConnectors/ contains the connector adapters (including walletconnect.ts, which carries the __MOCK_WALLETCONNECT__ E2E hook at line 20). None has tests. The adapters are the boundary between the app and external wallet providers; a regression in account-address handling or chain reporting ships silently into every connect flow.
Why this is architecturally hard
- Provider fakes are the test design. The adapters wrap external providers; tests need stubbed provider objects asserting the adapter's mapping (addresses, chain ids, errors).
- The mock hook must be pinned. The
__MOCK_WALLETCONNECT__ path (line 20-25) is exactly the kind of branch that drifts; tests should pin both the mock and real paths.
Acceptance criteria
- Tests cover the adapter mapping for mocked providers (address/chain/error cases).
- Tests run in CI via
npm test.
Out of scope
Connector internals; the wallet hook layer.
Getting started
src/lib/walletConnectors/ — the adapters
src/hooks/__tests__/ — the hook test pattern
Commands: npm test.
Good first files to read: src/lib/walletConnectors/walletconnect.ts.
walletConnectors lib has no tests: connector adapters are uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
src/lib/walletConnectors/contains the connector adapters (includingwalletconnect.ts, which carries the__MOCK_WALLETCONNECT__E2E hook at line 20). None has tests. The adapters are the boundary between the app and external wallet providers; a regression in account-address handling or chain reporting ships silently into every connect flow.Why this is architecturally hard
__MOCK_WALLETCONNECT__path (line 20-25) is exactly the kind of branch that drifts; tests should pin both the mock and real paths.Acceptance criteria
npm test.Out of scope
Connector internals; the wallet hook layer.
Getting started
src/lib/walletConnectors/— the adapterssrc/hooks/__tests__/— the hook test patternCommands:
npm test.Good first files to read:
src/lib/walletConnectors/walletconnect.ts.