-
Notifications
You must be signed in to change notification settings - Fork 173
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
test: migrate to vitest #349
Conversation
I'm -0.5 on this, Vitest shares a lot of the same problems as Jest (you're not testing on Node.js, you're testing in Jest/Vitest runtime), I would rather like to see us move away from this and use |
Indeed, nothing changes in that regard here, though to be fair most of the tests spawn Corepack in a This PR landing doesn't prevent migrating to |
Yes that’s true, I did not consider that. It seems there are some changes which are not directly related to switching to Vitest in this PR, right? Do you know why the nock files need to change? |
Most of them were renamed because of https://github.com/nodejs/corepack/pull/349/files#diff-b017716ca1490209cba877efb506d6b0cd9d724dda50f33a7384a88da852067fR23 - http utils fetchUrlStream rejects with error
+ tests/httpUtils.test.ts > http utils fetchUrlStream > rejects with error The ones that actually changed deserialises to the same content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail with a module not found error without this patch.
@arcanis Clipanion could probably use the imports
field for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR fixing this issue: arcanis/clipanion#155
I tested using |
278007a
to
38dd76c
Compare
While concerns about Jest/Vitest shared here may be valid, migration to Vitest will bring a clear improvement of our dev environment, and will enable me to proceed with more modernization actions that I have on my radar. |
38dd76c
to
a00fa7c
Compare
a00fa7c
to
fc0e3b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please fix the conflicts?
Reduces the amount of configuration and dependencies needed to run the tests with almost no changes to the code.
Ref #229 (comment)