Repository navigation
test: run approval-controller on Vitest - #10549
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-approval-controller
branch
from
September 29, 2026 08:11
57a9877 to
e91bdd0
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
September 29, 2026 08:11
c4fcfb2 to
54879b9
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
September 29, 2026 09:02
e91bdd0 to
ad263be
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
September 29, 2026 09:02
54879b9 to
79b9e14
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
September 29, 2026 14:38
ad263be to
c679083
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
September 29, 2026 14:38
79b9e14 to
12980e9
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-polling-controller
branch
from
September 30, 2026 07:04
12980e9 to
d248c2e
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
September 30, 2026 07:04
c679083 to
80c7790
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 5, 2026 10:48
d248c2e to
dbc8afc
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 5, 2026 10:48
80c7790 to
23f8c46
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 12, 2026 14:02
23f8c46 to
dffdbe0
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 12, 2026 14:02
dbc8afc to
79ecc80
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 12, 2026 15:43
dffdbe0 to
fe8b81c
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 12, 2026 15:43
79ecc80 to
56ec0c8
Compare
2 of 4 tasks
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 09:23
56ec0c8 to
0027854
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 09:23
fe8b81c to
4c4749e
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 12:47
0027854 to
52c697b
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
2 times, most recently
from
October 14, 2026 12:53
642b296 to
d3960d8
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 13:44
342e176 to
09e3b96
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 13:44
d3960d8 to
8112a4b
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
2 times, most recently
from
October 14, 2026 18:11
b549cff to
9373d55
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 18:11
bf6fb8a to
2d85bf5
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 20:18
9373d55 to
b2c633b
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 20:18
2d85bf5 to
3657884
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 20:37
b2c633b to
acb7896
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
2 times, most recently
from
October 14, 2026 20:59
72146c5 to
85f9712
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 20:59
acb7896 to
2369da2
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 21:27
85f9712 to
4ada28b
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 21:27
2369da2 to
68df0bc
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 14, 2026 22:48
4ada28b to
eb6f138
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 14, 2026 22:48
68df0bc to
e32a39c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e32a39c. Configure here.
cryptodev-2s
removed this pull request from stack #10578
October 14, 2026 22:51
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 15, 2026 10:36
e32a39c to
d168357
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
2 times, most recently
from
October 15, 2026 11:20
5d2a8a8 to
42f3009
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 15, 2026 11:20
d168357 to
e25274a
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 15, 2026 11:50
42f3009 to
3ca6b4f
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 15, 2026 11:50
e25274a to
4b735f3
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 15, 2026 12:20
3ca6b4f to
d648832
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
2 times, most recently
from
October 15, 2026 13:21
8b861e8 to
55fa07c
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 15, 2026 13:21
d648832 to
4a2b96c
Compare
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 15, 2026 14:48
55fa07c to
b9164d4
Compare
cryptodev-2s
force-pushed
the
test/vitest-polling-controller
branch
from
October 15, 2026 14:48
4a2b96c to
2bbfd60
Compare
cryptodev-2s
changed the base branch from
test/vitest-polling-controller
to
test/vitest-setup
October 15, 2026 14:56
cryptodev-2s
force-pushed
the
test/vitest-approval-controller
branch
from
October 15, 2026 15:38
b9164d4 to
6a453a3
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/approval-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).The error expectations needed a real change, because Vitest compares a thrown value strictly and the old
toThrow(plainObject)cannot match aJsonRpcError. That is split into #10576 so it lands on Jest and is reviewed on its own; with it in place the diff here is mechanical.Tests pass with coverage thresholds enforced.
yarn lintandyarn constraintsare green on this branch alone.References
Checklist
no-changeloglabel.Note
Low Risk
Test-only and tooling changes; no production code in
ApprovalControlleris modified.Overview
Migrates
@metamask/approval-controllerfrom Jest to Vitest as part of the repo-wide test runner rollout (stacked on shared Vitest package config).The package drops
jest.config.cjsand addsvitest.config.mjsmerged fromvitest.config.packages.mjs, keeping 100% coverage thresholds.package.jsontest scripts and devDependencies swap Jest/ts-jest for Vitest;@metamask/approval-controlleris removed fromtest-runners.cjs’s Jest package list.ApprovalController.test.tsis updated mechanically:jest.*→vi.*, explicitvitestimports (globals off),flushPromisesfromtests/vitest/helpers.js, and packagetsconfig.jsonsetstypes: []so repo-wide Jest types do not apply. Lint suppressions drop the Jest config entry and addvitest/no-conditional-in-testfor the test file.Reviewed by Cursor Bugbot for commit 6a453a3. Bugbot is set up for automated code reviews on this repo. Configure here.