MetaMask / MetaMask/metamask-extension

Task: Ensure State Used in Tests is Current

Open
#24,529 1 comment 0 reactions 0 assignees View on GitHub
team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### What is this about?

It is important that we ensure that global persistent state used in E2E tests and unit tests is current, meaning that new properties added to controller state are always reflected in the state used in tests. Two places we may use that (potentially) outdated state would be:

* `test/data/mock-state.json`
* `test/e2e/fixture-builder.js`

We should investigate methods for ensuring these files always contain complete state, hopefully via automation.

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by comparing the controller state used by the tests with test/data/mock-state.json and test/e2e/fixture-builder.js. Investigate how new controller-state properties could be detected or synchronized, then define the automation and validation needed to ensure both test-state sources remain complete; the issue does not specify acceptance tests or a final implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.