MetaMask / MetaMask/metamask-extension

Add unit tests for the `add-ethereum-chain.js` and `switch-ethereum-chain.js` RPC method middleware

Open
#18,089 1 comment 0 reactions 0 assignees View on GitHub
area-testSuite team-wallet-api-platform-deprecated type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

The RPC method middleware currently is not covered by any unit tests. We should backfill unit tests for `add-ethereum-chain.js` and `switch-ethereum-chain.js` to help ensure [recent changes](https://github.com/MetaMask/metamask-extension/pull/17421) to those modules have not broken anything.

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing unit-test conventions and the middleware files add-ethereum-chain.js and switch-ethereum-chain.js. Review the recent changes in pull request #17421, then add tests covering both RPC method middleware modules. Done means both modules have unit-test coverage that helps catch regressions from those changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.