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

Could we use Vitest over Jest? #420

Open
CocoisBuggy opened this issue Nov 12, 2024 · 2 comments
Open

Could we use Vitest over Jest? #420

CocoisBuggy opened this issue Nov 12, 2024 · 2 comments
Assignees
Labels
dev dev task question Further information is requested
Milestone

Comments

@CocoisBuggy
Copy link
Contributor

My suspicion is that vitest would let us clean up a lot of the test infrastructure using their fixtures. I have strange issues with jest that I consistently cannot explain and it is definitely verrrry slow. I'll attach a PR to this issue so that some numbers can be put alongside this musing.

@CocoisBuggy CocoisBuggy added question Further information is requested dev dev task labels Nov 12, 2024
@CocoisBuggy CocoisBuggy self-assigned this Nov 12, 2024
@vnugent vnugent added this to the v2 milestone Nov 25, 2024
@vnugent
Copy link
Contributor

vnugent commented Dec 10, 2024

I'm not familiar with Vite and also don't have a strong preference. Do we have to switch to vite for build as well? Can it be adopted incrementally?

@CocoisBuggy
Copy link
Contributor Author

CocoisBuggy commented Dec 10, 2024

My experience with vitest has always been that it's a drop-in replacement for jest. Config is a little different (it uses the vite config style), but api is otherwise identical to jest/node test/bun test.

Vite is not required to use vitest. Vitest uses vite under the hood and is part of that same ecosystem.

I have a pretty specific idea in connection with adopting vitest, and my hope is that I can speed up the tests a lot. I'll create a PR for it at some point to explain my idea - I like to run tests as I code so speed is a big priority when I build test suites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev dev task question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants