Skip to content

test: migrate the package template to Vitest - #10853

Open
cryptodev-2s wants to merge 1 commit into
test/vitest-setupfrom
test/vitest-package-template
Open

cryptodev-2s wants to merge 1 commit into
test/vitest-setupfrom
test/vitest-package-template

Conversation

@cryptodev-2s

@cryptodev-2s cryptodev-2s commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

Migrate package-template to vitest.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
    • Not applicable, test only change to a private template package. Carries the no-changelog label.
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
    • None.

Note

Low Risk
Test-only tooling change on a private template package; no runtime or consumer API impact.

Overview
Migrates @metamask/package-template from Jest to Vitest, aligning the scaffold package with the repo’s default test runner for new packages.

Jest is removed (jest.config.cjs, Jest-related devDependencies, and NODE_OPTIONS=--experimental-vm-modules test scripts). Tests now run via Vitest (vitest.config.mjs merged from vitest.config.packages.mjs, with the same 100% coverage thresholds). The sample test imports describe / expect / it from vitest, and tsconfig.json sets compilerOptions.types to [] so repo-wide Jest types do not apply.

@metamask/package-template is dropped from the Jest list in test-runner-package-map.cjs, and the oxlint suppression for the deleted Jest config is cleaned up.

Reviewed by Cursor Bugbot for commit 791ce92. Bugbot is set up for automated code reviews on this repo. Configure here.

@cryptodev-2s cryptodev-2s changed the title test: run the package template on Vitest so generated packages do too test: migrate the package template to Vitest Oct 15, 2026
@cryptodev-2s cryptodev-2s self-assigned this Oct 15, 2026
@cryptodev-2s
cryptodev-2s force-pushed the test/vitest-package-template branch from 004f170 to 791ce92 Compare October 16, 2026 00:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant