MetaMask / MetaMask/core

NetworkController tests are very slow and should run faster

Open
#5,944 0 comments 0 reactions 0 assignees View on GitHub
team-wallet-framework wf-developer-velocity
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

Specifically, these test files are slow to run:

- `NetworkController.test.ts` (~32s)
- `create-network-client.test.ts` (~311s !!)

We should investigate why it takes so long for these to run, and fix them.

I have a hunch that it has something to do with the custom assertions that I added which wait for promises to be resolved, but there may be other reasons.

## Acceptance Criteria

- All tests for `network-controller` should run in less than 10 seconds.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running NetworkController.test.ts and create-network-client.test.ts and measuring their current runtimes. Inspect the custom assertions that wait for promises, along with other causes of delay, then rerun all network-controller tests; done means they complete in under 10 seconds.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
performance, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.