Skip to content

chore: upgrade vitest#1291

Open
arkadiy93 wants to merge 2 commits into
mainfrom
fix/upgradeVitest
Open

chore: upgrade vitest#1291
arkadiy93 wants to merge 2 commits into
mainfrom
fix/upgradeVitest

Conversation

@arkadiy93
Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings June 3, 2026 14:01
@arkadiy93 arkadiy93 changed the title Fix/upgrade vitest chore: upgrade vitest Jun 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades the repo’s Vitest setup to v4.x (including browser testing) and adapts configs/tests/mocks to the updated Vitest APIs so the test suite continues to run under the new version.

Changes:

  • Bump vitest, @vitest/browser, and @vitest/coverage-v8 to ^4.1.8 and add @vitest/browser-playwright.
  • Update vitest.config.ts to use the new Playwright provider API (playwright()).
  • Adjust multiple tests to the new Vitest timeout/options argument placement and extend jsdom mocks (e.g., scrollTo).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vitest.config.ts Switch browser provider config to @vitest/browser-playwright (playwright()) for Vitest v4 browser mode.
src/tests/browserMocks.ts Refine browser API mocks (Resize/IntersectionObserver as classes) and add scrollTo stub for jsdom.
src/providers/TableOfContentsProvider.jsdom.test.tsx Update test timeout/options argument ordering for Vitest v4.
src/organisms/TopBar/Resources/Resources.test.tsx Update test timeout/options argument ordering for Vitest v4.
src/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.test.tsx Update test timeout/options argument ordering for Vitest v4.
src/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.test.tsx Update test timeout/options argument ordering for Vitest v4.
src/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.test.tsx Update sequential tests and parameterized tests to Vitest v4 options signature.
src/organisms/TopBar/Account/Account.test.tsx Update suite/test option placement to align with Vitest v4 signatures.
public/mockServiceWorker.js Update MSW worker PACKAGE_VERSION (but see review comment re: integrity checksum).
package.json Bump Vitest-related dev dependencies and add @vitest/browser-playwright.
bun.lock Lockfile updates for the new Vitest/browser/coverage dependency graph.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread public/mockServiceWorker.js
@arkadiy93 arkadiy93 requested a review from yunarch June 3, 2026 14:10
@arkadiy93 arkadiy93 marked this pull request as ready for review June 3, 2026 14:10
@arkadiy93 arkadiy93 requested a review from a team as a code owner June 3, 2026 14:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 99.43% (🎯 100%) 6141 / 6176
🔵 Statements 99.26% (🎯 100%) 10197 / 10272
🔵 Functions 99.86% (🎯 100%) 1488 / 1490
🔵 Branches 96.43% (🎯 100%) 3756 / 3895
File CoverageNo changed files found.
Generated in workflow #2320 for commit e8ce488 by the Vitest Coverage Report Action

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants