-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Meta: AVA -> Vitest #5801
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
Meta: AVA -> Vitest #5801
Conversation
source/github-helpers/index.test.ts
Outdated
| 'r2.0', | ||
| '3.0', | ||
| ]), '3.0', 'Tags should be sorted by version'); | ||
| ])).toBe('3.0'); |
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.
The only problem is this. Jest and vitest don’t have this sort of message, so the only way to support it would be to move the message to a comment. Not that great of a DX
The closes equivalent would be to wrap each expectation in an test() to describe it and then replace the parent test() with describe()
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.
The assert api might match AVA’s exactly https://www.chaijs.com/api/assert/, and it's also included in vitest
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.
Fixed!
| @@ -0,0 +1,68 @@ | |||
| // Vitest Snapshot v1 | |||
|
|
|||
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.
I have to mark this file as generated in .gitattributes
|
Is it a federal crime to drop a sindre package? |
Shh don't tell him, he's AFK |
|
I haven't even finished work on the |
For speed and lack of hacks everywhere. The API may be less great.
I used Jest’ codemods to do most of the changesand then fixed a couple of AVA-only features/awkwardnessEdit: I reverted the codemod and did a simple search and replace to preserve the assert-style tests; Jest prefers
expect(), which doesn't support custom error messagesBefore
After