Skip to content

ROX-33205: Upgrade vitest 4.1.0#19462

Merged
pedrottimark merged 2 commits intomasterfrom
ROX-33205-devDependencies-vitest-4.1.0
Mar 18, 2026
Merged

ROX-33205: Upgrade vitest 4.1.0#19462
pedrottimark merged 2 commits intomasterfrom
ROX-33205-devDependencies-vitest-4.1.0

Conversation

@pedrottimark
Copy link
Contributor

@pedrottimark pedrottimark commented Mar 17, 2026

Description

https://vitest.dev/blog/vitest-4

https://vitest.dev/guide/migration

Vitest 4.0 requires Vite >= 6.0.0 and Node.js >= 20.0.0.

https://vitest.dev/guide/migration.html#simplified-exclude

By default, Vitest now only excludes tests from node_modules and .git folders.

This means that Vitest no longer excludes:

  • dist and cypress folders
  • .idea, .cache, .output, .temp folders
  • config files like rollup.config.js, prettier.config.js, ava.config.js and so on

If you need to limit the directory where your tests files are located, use the test.dir option instead because it is more performant than excluding files

eslint-plugin-vitest

https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md

This rule aims to prevent false positive test results by highlighting conditional expect statements.

That is, if conditional is incorrect, I guess.

Add ESLint disable comment, because false positive does not seem like a risk.

plugin-react

TL;DR Upgrade to 5.2.0 because it supports, but does not require, vite 8.

https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%406.0.0

Vite 7 and below are no longer supported. If you are using Vite 7, please upgrade to Vite 8.

https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.2.0

This plugin is compatible with Vite 8.

https://github.com/vitejs/vite-plugin-react/releases/tag/plugin-react%405.0.0

This plugin now requires Node 20.19+ or 22.12+.

Procedure

  1. npm outdated in ui/apps/platform folder.

  2. Visit npmjs.com for outdated vitest and related dependencies

    • @testing-library/…
    • @vitest/…
  3. Click Repository link, and then read either of the following:

    • Releases
    • CHANGELOG.md

User-facing documentation

  • CHANGELOG.md update is not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • edited unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  1. npm run tsc in ui/apps/platform folder.
  2. npm run lint:fast-dev in ui/apps/platform folder.
  3. npm run test in ui/apps/platform folder.

Same counts before and after upgrade:

 Test Files  122 passed (122)
      Tests  1316 passed | 2 skipped (1318)

@pedrottimark pedrottimark requested review from a team as code owners March 17, 2026 16:52
@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 17, 2026

Images are ready for the commit at b105f44.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-352-gb105f44e57.

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.32%. Comparing base (f5d5cf0) to head (b105f44).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19462   +/-   ##
=======================================
  Coverage   49.32%   49.32%           
=======================================
  Files        2722     2722           
  Lines      205173   205171    -2     
=======================================
+ Hits       101199   101204    +5     
+ Misses      96442    96437    -5     
+ Partials     7532     7530    -2     
Flag Coverage Δ
go-unit-tests 49.32% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pedrottimark
Copy link
Contributor Author

/test gke-upgrade-tests

@pedrottimark pedrottimark merged commit 1a5dfd0 into master Mar 18, 2026
95 checks passed
@pedrottimark pedrottimark deleted the ROX-33205-devDependencies-vitest-4.1.0 branch March 18, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants