Skip to content

Chore/vitest#3007

Open
mariusAsaTNG wants to merge 11 commits intomainfrom
chore/vitest
Open

Chore/vitest#3007
mariusAsaTNG wants to merge 11 commits intomainfrom
chore/vitest

Conversation

@mariusAsaTNG
Copy link
Contributor

Summary of changes

Move from jest to vitest, also from jsdom to happy-dom, since it is faster

Context and reason for change

Vitest is a more modern testing framework and works well with vite

How can the changes be tested

run yarn test:unit

Note: Please review the guidelines for contributing to this repository.

@mariusAsaTNG mariusAsaTNG force-pushed the chore/vitest branch 3 times, most recently from e76e413 to f71bb44 Compare February 4, 2026 16:51
@mariusAsaTNG mariusAsaTNG marked this pull request as ready for review February 4, 2026 16:51
@socket-security
Copy link

socket-security bot commented Feb 4, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvitest@​4.0.18961007998100
Addedhappy-dom@​20.5.0951008896100
Added@​vitest/​eslint-plugin@​1.6.69610010096100

View full report

@socket-security
Copy link

socket-security bot commented Feb 4, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm entities is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: ?npm/happy-dom@20.5.0npm/vite-plugin-svgr@4.5.0npm/entities@4.5.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/entities@4.5.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@mstykow
Copy link
Member

mstykow commented Feb 4, 2026

Can you say something about performance before and after?

@mariusAsaTNG
Copy link
Contributor Author

mariusAsaTNG commented Feb 5, 2026

Good point, we are missing some extra info here:
For two examples see here: jest vs vitest

  • Vitest is actually slower than jest, we go from 37s -> 1m18s, which is ~2x slower
  • 1m19s is still great and I do not think we should be worrying just yet
  • Vitest is in active development and more future proof, while jest seems to be in maintenance mode
  • The tests now show us how long they ran, so we could work on fixing some tests that are bad (e.g. AttributionForm takes ~8s)

@mariusAsaTNG
Copy link
Contributor Author

Also it is best to look commit by commit since the 2nd commit is a regex and fixing some imports

Copy link
Contributor

@LMayTNG LMayTNG left a comment

Choose a reason for hiding this comment

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

The last commit is named a bit confusingly, but otherwise everything's great!

@mariusAsaTNG mariusAsaTNG linked an issue Feb 9, 2026 that may be closed by this pull request
@mariusAsaTNG mariusAsaTNG force-pushed the chore/vitest branch 4 times, most recently from d011bbe to c1cc7ee Compare February 11, 2026 12:00
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.

Migrate to vitest as test runner

3 participants