MetaMask / MetaMask/metamask-extension

Enable "resetMocks" Jest option

Open
#12,358 1 comment 0 reactions 0 assignees View on GitHub
area-testSuite contributor experience type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

We should enable the "resetMocks" option in our Jest configuration. This option resets all mocks between each test, which helps prevent tests from accidentally becoming dependent upon each other.

Contributor guide

Open the contributing guide

Research direction

Locate the repository's Jest configuration and inspect how test options are defined. Enable resetMocks there, then run the relevant Jest tests to confirm mocks are reset between tests and that the existing suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.