MetaMask / MetaMask/snaps

Improve testing for controllers

Open
#991 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

Description

`snaps-controllers` tests currently depend on the `snaps-execution-environments` Webpack build. These tests could be improved by running with a mocked execution environment instead, which would remove the need for the `snaps-execution-envrionments` build. It can also speed up tests by a lot.

For this it's important that we have good unit tests in both packages.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the existing tests in the snaps-controllers package and how they depend on the snaps-execution-environments Webpack build. Determine the mocking boundary and add unit coverage in both packages. Done means the controller tests run with a mocked execution environment, no longer require that build, and retain good coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.