Incomplete test coverage makes coverage threshold messages difficult to resolve
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 413
- Forks
- 308
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 253
Description
There are several packages in this repo that do not have 100% test coverage. In fact we've explicitly set coverage thresholds to match the true coverage today. This makes sense on the surface, but occasionally, a change is made in a PR which causes the coverage to slip below the threshold, which causes a failed build (example: https://github.com/MetaMask/core/actions/runs/9473788927/job/26102151727?pr=4254). These errors are difficult to debug because it is unclear just by looking at the build output where the lack of coverage lies. We need to run `yarn test:verbose` locally on `develop` (or the base branch) and then again against the topic branch and manually compare the output visually. This is a pain. It would be great if we didn't need to do this.
## Acceptance Criteria
We are able to bring all of the numbers underneath the `coverageThreshold` portion of the Jest configuration to 100% for the following packages:
- `@metamask/assets-controllers`
- `@metamask/base-controller`
- `@metamask/controller-utils`
- `@metamask/gas-fee-controller`
- `@metamask/json-rpc-middleware-stream`
- `@metamask/keyring-controller`
- `@metamask/network-controller`
- `@metamask/polling-controller`
- `@metamask/preferences-controller`
- `@metamask/profile-sync-controller`
- `@metamask/rate-limit-controller`
- `@metamask/transaction-controller`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Jest configuration's coverageThreshold section and run `yarn test:verbose` on `develop`, then on a topic branch, to identify uncovered code. Work through the twelve listed packages and add the missing test coverage. Done means every listed package has all coverage numbers at 100% and the coverage checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100