Repository navigation
test: run user-operation-controller on Vitest - #10556
Open
cryptodev-2s wants to merge 1 commit into
Open
cryptodev-2s wants to merge 1 commit into
cryptodev-2s wants to merge 1 commit into
Conversation
cryptodev-2s
added this pull request to stack #10557
September 28, 2026 20:19
2 of 4 tasks
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
September 29, 2026 08:11
050fa68 to
c972b23
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
September 29, 2026 08:11
4949720 to
4a6a4a2
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
September 29, 2026 09:02
c972b23 to
8fa7689
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
September 29, 2026 09:02
4a6a4a2 to
8a4ccb8
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
September 29, 2026 14:38
8fa7689 to
2a0668f
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
September 29, 2026 14:38
8a4ccb8 to
4204cd4
Compare
cryptodev-2s
removed this pull request from stack #10557
September 29, 2026 14:40
cryptodev-2s
added this pull request to stack #10578
September 29, 2026 14:41
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
September 30, 2026 07:04
2a0668f to
e64ca0a
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
2 times, most recently
from
October 5, 2026 10:48
082d1f4 to
8421df4
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 5, 2026 10:48
e64ca0a to
7995d60
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 12, 2026 14:02
7995d60 to
e59fba9
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 12, 2026 14:02
8421df4 to
534eb2b
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 12, 2026 15:43
e59fba9 to
b76e8f3
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
2 times, most recently
from
October 14, 2026 09:24
4c40019 to
fd50cd7
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 14, 2026 09:24
b76e8f3 to
146d5a8
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 14, 2026 12:47
fd50cd7 to
2c5e08a
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
2 times, most recently
from
October 14, 2026 12:53
6d64a0f to
e4ce20d
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 14, 2026 18:11
3923bce to
2ff098a
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 14, 2026 18:11
59ca90f to
005866c
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 14, 2026 20:18
2ff098a to
f352b76
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
2 times, most recently
from
October 14, 2026 20:37
1c37712 to
95c4b34
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
2 times, most recently
from
October 14, 2026 20:59
5e08c84 to
9b4e972
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 14, 2026 20:59
95c4b34 to
c700fc6
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 14, 2026 21:27
9b4e972 to
2e9d2ec
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
2 times, most recently
from
October 14, 2026 22:48
1d883b0 to
c597d15
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 14, 2026 22:48
2e9d2ec to
3f2a8dd
Compare
cryptodev-2s
removed this pull request from stack #10578
October 14, 2026 22:51
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 10:36
c597d15 to
ea0c4d8
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 15, 2026 10:36
3f2a8dd to
5cbd6b0
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 11:20
ea0c4d8 to
5ebe6f4
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 15, 2026 11:20
5cbd6b0 to
54e7d4c
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 11:50
5ebe6f4 to
1603f69
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 15, 2026 11:50
54e7d4c to
2837724
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 12:20
1603f69 to
f0e57e8
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 15, 2026 12:20
2837724 to
cffacfe
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 13:21
f0e57e8 to
75ebf14
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 15, 2026 13:21
cffacfe to
0a7eb9a
Compare
2 of 4 tasks
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 14:48
75ebf14 to
d9c24b6
Compare
cryptodev-2s
force-pushed
the
test/vitest-subscription-controller
branch
from
October 15, 2026 14:48
0a7eb9a to
13fd51b
Compare
cryptodev-2s
changed the base branch from
test/vitest-subscription-controller
to
test/vitest-setup
October 15, 2026 14:55
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 15:38
d9c24b6 to
ca5d120
Compare
cryptodev-2s
force-pushed
the
test/vitest-user-operation-controller
branch
from
October 15, 2026 20:08
ca5d120 to
f0e0ea2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Moves
@metamask/user-operation-controllerto Vitest. One of a stack on top of #10546, which added Vitest without migrating anything.Add
vitest.config.mts, deletejest.config.cjs, swap the test scripts and dev dependencies, point the package tsconfig off the repo widetypes: ["jest"], and rewrite the test files (jest.*tovi.*,jest.Mockedto the imported Vitest type,requireActualto an awaitedimportActual, and an explicitvitestimport per file sinceglobalsis off).Four mocked constructors needed
mockImplementation(function () { ... }): Vitest refusesmockReturnValueon a mock called withnew. Those four sites caused 84 failures, so the diff reads worse than it is. Coverage thresholds restated at measured values. Istanbul on esbuild output counts statements slightly differently from babel onts-jestoutput, within about a point.Tests pass with coverage thresholds enforced.
yarn lintandyarn constraintsare green on this branch alone.References
Checklist
no-changeloglabel.Note
Low Risk
Test and tooling changes only; production source under
src/is not modified in this diff.Overview
Migrates
@metamask/user-operation-controllerfrom Jest to Vitest, aligning it with the repo’s shared Vitest package setup.Removes
jest.config.cjsand Jest-related devDependencies/scripts; addsvitest.config.mjs(merged fromvitest.config.packages.mjs) with coverage thresholds retuned for Vitest/Istanbul. Packagetsconfig.jsonclearstypesso Jest globals are not pulled in. Test files now import Vitest explicitly and usevi.*instead ofjest.*, including asyncimportActualfor partial mocks andmockImplementationon constructor mocks where Vitest disallowsmockReturnValuewithnew.@metamask/user-operation-controlleris dropped fromtest-runners.cjs’s Jest package list;oxlint-suppressions.jsonis trimmed for removed Jest-only lint entries.Reviewed by Cursor Bugbot for commit f0e0ea2. Bugbot is set up for automated code reviews on this repo. Configure here.