lambdaclass / lambdaclass/eth-agent
Test mocks use 'any' types - loses type safety
Open
Nobody has claimed this yet.
code-quality
low-priority
testing
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Mock objects in tests are typed as any, losing type safety benefits.
Location
test/agent/wallet.test.ts:41-45
Current Code
let mockRpc: any;
let mockEns: any;
let mockGasOracle: any;
Recommendation
- Create proper mock types or use vitest's mock typing
- Consider using
vi.mocked<T>()patterns consistently
Priority
Low - Test quality
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/agent/wallet.test.ts:41-45 and inspect how the mock objects are used. Replace the any-typed mocks with proper mock types or Vitest's vi.mocked() pattern, then confirm the test mocks retain type safety without changing their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100