Repository navigation
test: run accounts-controller on Vitest - #10551
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-sample-controllers
branch
from
September 29, 2026 08:11
8b32e92 to
67053a2
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
September 29, 2026 08:11
26d0583 to
13cd0c5
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
September 29, 2026 09:02
67053a2 to
b3e82c5
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
September 29, 2026 09:02
13cd0c5 to
67d664b
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
September 29, 2026 14:38
b3e82c5 to
a1d4e04
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
September 29, 2026 14:38
67d664b to
19b538e
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-accounts-controller
branch
from
September 30, 2026 07:04
19b538e to
3b9fa5f
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
2 times, most recently
from
October 5, 2026 10:48
364aa75 to
63eccab
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 5, 2026 10:48
3b9fa5f to
2a0fcab
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 12, 2026 14:02
2a0fcab to
c101a7a
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 12, 2026 14:02
63eccab to
71c2fed
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 12, 2026 15:43
c101a7a to
d6f72bf
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
2 times, most recently
from
October 14, 2026 09:23
326b876 to
253b29c
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 14, 2026 09:23
d6f72bf to
b73f918
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 14, 2026 12:47
253b29c to
bfbd149
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
2 times, most recently
from
October 14, 2026 12:53
655bb71 to
94f8988
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 14, 2026 13:44
0ca3777 to
ac3840f
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 14, 2026 13:44
94f8988 to
c0a4cda
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 14, 2026 18:11
eac8ba0 to
c533375
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
2 times, most recently
from
October 14, 2026 20:18
9be48e8 to
7d3768b
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
2 times, most recently
from
October 14, 2026 20:37
7d298b8 to
e282b91
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
2 times, most recently
from
October 14, 2026 20:59
60962aa to
fa046eb
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
2 times, most recently
from
October 14, 2026 21:27
0521230 to
c1ad23d
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 14, 2026 21:27
fa046eb to
f9f28e3
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 14, 2026 22:48
c1ad23d to
fd6ff54
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 14, 2026 22:48
f9f28e3 to
7e7d023
Compare
cryptodev-2s
removed this pull request from stack #10578
October 14, 2026 22:51
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 15, 2026 10:36
fd6ff54 to
83be520
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
2 times, most recently
from
October 15, 2026 11:20
0b21fde to
a196bd2
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 15, 2026 11:20
83be520 to
efde443
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 15, 2026 11:50
a196bd2 to
8e3abbd
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
2 times, most recently
from
October 15, 2026 12:20
c0fd4d7 to
b346698
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
2 times, most recently
from
October 15, 2026 13:21
56d6d16 to
fe67e0d
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
2 times, most recently
from
October 15, 2026 14:48
a2673d1 to
f73bc66
Compare
cryptodev-2s
force-pushed
the
test/vitest-sample-controllers
branch
from
October 15, 2026 14:48
fe67e0d to
d7f992a
Compare
cryptodev-2s
changed the base branch from
test/vitest-sample-controllers
to
test/vitest-setup
October 15, 2026 14:56
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
2 times, most recently
from
October 15, 2026 20:07
3c575be to
f5b5edb
Compare
cryptodev-2s
force-pushed
the
test/vitest-accounts-controller
branch
from
October 15, 2026 23:52
f5b5edb to
2c3613b
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/accounts-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).createExpectedInternalAccountmoves out oftests/mocks.tsintotests/expectations.ts. It usesexpect.any(Number), and an asymmetric matcher from one runner means nothing to the other, whilemocks.tsis imported byassets-controllers, still on Jest.Tests pass with coverage thresholds enforced.
yarn lintandyarn constraintsare green on this branch alone.References
Checklist
no-changeloglabel.Note
Low Risk
Test-only migration with no production API changes; the split of Vitest-specific matchers into
expectations.tspreserves Jest compatibility for shared mocks.Overview
Migrates
@metamask/accounts-controllerfrom Jest to Vitest as part of the repo-wide test-runner rollout. Production code is unchanged; only test tooling and test files are touched.The package drops
jest.config.cjsand Jest-related devDependencies in favor ofvitest.config.mjs(same coverage thresholds as before) andvitestscripts inpackage.json.test-runner-package-map.cjsno longer lists this package as Jest-based. Packagetsconfig.jsonsetscompilerOptions.typesto[]so repo-wide Jest types do not apply while Vitest runs without globals.Tests import
describe/expect/viexplicitly and replacejest.*withvi.*(includingvi.importActualfor theuuidmock).createExpectedInternalAccountmoves fromtests/mocks.tsinto newtests/expectations.tsbecause it uses Vitest’sexpect.any(Number);mocks.tsstays free of Vitest so Jest consumers (e.g.assets-controllers) can keep importing it.Reviewed by Cursor Bugbot for commit 2c3613b. Bugbot is set up for automated code reviews on this repo. Configure here.