Skip to content

test: run auth packages on Vitest - #10951

Merged
cryptodev-2s merged 1 commit into
mainfrom
test/vitest-auth
Oct 21, 2026
Merged

cryptodev-2s merged 1 commit into
mainfrom
test/vitest-auth

Conversation

@cryptodev-2s

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

Copy link
Copy Markdown
Contributor

Explanation

Moves @metamask/authenticated-user-storage 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. 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 migration with no changes to library source; risk is limited to CI/local test execution for this package.

Overview
Migrates @metamask/authenticated-user-storage from Jest to Vitest as part of the repo-wide test-runner move for auth-related packages.

The package drops jest.config.cjs and adds vitest.config.ts merged from the shared vitest.config.packages.js, keeping 100% coverage thresholds on branches, functions, lines, and statements. package.json test scripts now invoke vitest (including watch/verbose/clearCache), Jest-related devDependencies are removed, and vitest is added.

Tests in authenticated-user-storage.test.ts are updated to Vitest APIs (vi.spyOn, vi.fn, Mock type). tsconfig.json no longer includes Jest types. Monorepo wiring removes the package from PACKAGES_ON_JEST in test-runner-package-map.cjs and drops the obsolete Jest config entry from oxlint-suppressions.json.

No production/runtime code changes—test and tooling only.

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

@cryptodev-2s
cryptodev-2s marked this pull request as ready for review October 21, 2026 10:26
@cryptodev-2s
cryptodev-2s requested review from a team as code owners October 21, 2026 10:26
@cryptodev-2s cryptodev-2s self-assigned this Oct 21, 2026
@cryptodev-2s
cryptodev-2s added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit fa747b0 Oct 21, 2026
371 checks passed
@cryptodev-2s
cryptodev-2s deleted the test/vitest-auth branch October 21, 2026 10:39
Prithpal-Sooriya added a commit that referenced this pull request Oct 26, 2026
…itest migration

- Replace one `jest.spyOn` with `vi.spyOn` in the user-assets tests;
  main migrated this package from Jest to Vitest (#10951).
- Update `oxlint-suppressions.json`: one additional
  `no-unsafe-assignment`/`no-unsafe-return` pair from the new
  `getUserAssets` method (same `fetchQuery` idiom as the existing
  getters) and one `vitest/no-conditional-in-test` suppression for the
  cache-invalidation table test, matching repo-wide norms.

This branch was previously deployed

1 inactive deployment
default-branch — 450cccba Deployed Oct 21, 2026 by cryptodev-2s via Determine whether this PR is a release PR #5793
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.

2 participants