Repository navigation
test: read the Jest holdout list from one shared module - #10848
Merged
Merged
Conversation
cryptodev-2s
changed the base branch from
test/vitest-user-operation-controller
to
test/vitest-setup
October 15, 2026 14:25
cryptodev-2s
force-pushed
the
test/vitest-shared-runner-list
branch
from
October 15, 2026 14:27
b61ad42 to
9a8c252
Compare
2 of 4 tasks
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
PACKAGES_ON_JESTlived inyarn.config.cjswhileoxlint.config.tsworked the same fact out for itself by probing the filesystem forpackages/*/vitest.config.mjs. Two sources of truth for one question, and they could disagree: a package listed as a Jest holdout that also has avitest.config.mjswould get Vitest globs from oxlint while constraints demanded Jest scripts.The list moves to
test-runners.cjsand both read it. CommonJS, becauseyarn.config.cjsis CommonJS and has torequireit;oxlint.config.tsreaches it withcreateRequirerather than relying on module interop. That also keeps the "do not add to this list" note next to the data it governs.One deliberate loss: oxlint no longer discovers runners from disk, so it depends on the list being accurate. That is the point. Stripping the scope to get a directory name is safe because
yarn.config.cjsalready constrains every package to be named@metamask/${workspaceBasename}.test-runners.cjscarries animport/unambiguoussuppression, as every other.cjsfile in the repo does.References
test-runners.cjsrather than the inline listChecklist
no-changeloglabel.Note
Low Risk
Config-only refactor for lint and Yarn constraints; wrong list entries could mis-apply Jest/Vitest Oxlint rules on test files but does not affect runtime product code.
Overview
Centralizes the Jest holdout package list in new
test-runners.cjsso Yarn constraints and Oxlint agree on which packages still use Jest vs Vitest.yarn.config.cjsdrops its ~100-line inlinePACKAGES_ON_JESTset andrequires the shared module instead.oxlint.config.tsstops inferring runners frompackages/*/vitest.config.mjson disk and loads the same list viacreateRequire, then splits package dirs into Jest vs Vitest test globs from that data. Animport/unambiguoussuppression is added for the new.cjsfile.Reviewed by Cursor Bugbot for commit 9a8c252. Bugbot is set up for automated code reviews on this repo. Configure here.