Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to vitest #1369

Merged
merged 17 commits into from
Dec 11, 2023
Merged

Switching to vitest #1369

merged 17 commits into from
Dec 11, 2023

Conversation

RobinTail
Copy link
Owner

@RobinTail RobinTail commented Dec 10, 2023

Working on compatibility support of vitest in #1301 I was surprised by how good it works outta the box.
Meanwhile, I'm not satisfied by the ESM support in jest, which is probably not going to be better in Jest 30.
So I'm exploring the possibility to switch to vitest instead.
Compatibility with jest will remain.

Also

  • I don't like jest globals
  • I don't like that jest changes the behaviour of node:assert (asserting with message:CustomError) against its documentation.

@RobinTail RobinTail added dependencies Pull requests that update a dependency file coverage Additional tests refactoring The better way to achieve the same result CI/CD labels Dec 10, 2023
@RobinTail RobinTail marked this pull request as ready for review December 10, 2023 10:32
@RobinTail
Copy link
Owner Author

I like it.
This can also enable me to use latest versions if chalk and has-ansi that are ESM only.

@RobinTail
Copy link
Owner Author

Performance test

Test Jest (master) Vitest (feat) Diff
Locally 6.8-8.2 11.5 - 12.2s +4.5s

Not good, maybe it's due to reporter

@RobinTail
Copy link
Owner Author

RobinTail commented Dec 10, 2023

9.95s locally was the best result of Vitest.
Tried all documented performance features.

@RobinTail
Copy link
Owner Author

Related issue: vitest-dev/vitest#579

@RobinTail
Copy link
Owner Author

RobinTail commented Dec 10, 2023

Performance test

Test Jest (master) Vitest (feat) Diff
Locally ~7.5s ~7.6s 🆗

Good locally, but it fails in CI and also affects the coverage ❌

@coveralls
Copy link

coveralls commented Dec 10, 2023

Coverage Status

coverage: 100.0%. remained the same
when pulling 207665f on switch-to-vitest
into fbe755d on master.

Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

alright, so far it is as much as I can do

@RobinTail RobinTail merged commit db622e3 into master Dec 11, 2023
@RobinTail RobinTail deleted the switch-to-vitest branch December 11, 2023 14:26
RobinTail added a commit that referenced this pull request Dec 11, 2023
Reducing branch complexity that way.
⚠️ Requires to get rid of Jest: #1369
RobinTail added a commit that referenced this pull request Dec 11, 2023
Requires #1369 (for ansi packages)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD coverage Additional tests dependencies Pull requests that update a dependency file refactoring The better way to achieve the same result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants