-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Move from Jest to a more suitable alternative #813
Comments
@arboleya I agree. I will add something: I feel like we should re-evaluate #728 since it has been blocked/stuck for a long time, and maybe just rename the issue to 'Switch to a new testing setup' and include switching to a new test runner in that issue. All of this feels like a part of one big problem that we are trying to solve. We can first switch to a new test runner, and then look into how we can run those tests in a browser. Putting in more work into figuring out how to run the tests in a browser with Jest, only to switch to a different test runner soon doesn't sound ideal. |
We need to first make sure vitest is compatible with Browser based testing and execution, IE Jasmine or Karma, or purely within the vistest ecosystem. see @vitest/browser (https://www.npmjs.com/package/@vitest/browser):
According to this GH issue it is NOT compatible, so that would be a hard blocker: But then later on I see this merge as it seems someone kept pushing, but not marked ready for production: |
Also I am not sure where we got the idea that vitest is faster, Jest is proven to be faster on multiple projects, so I'd like to see the benchmarks here. See https://bradgarropy.com/blog/jest-over-vitest I'd suggest we stay on Jest and just finish this PR #728 as is, and move on to the next thing |
@camsjams I went through that thread that you linked, someone suggested having a look at karma-vite |
This comment also seems interesting, seems like this person is trying to achieve more or less what we want to: vitest-dev/vitest#586 (comment) |
@camsjams @Dhaiwat10 Yes, I agree that testing is delicate and that we should move on with #728 for now, which I'm working to unblock. That doesn't mean we can't talk about options here — btw, great set of links, guys. Thanks. |
Currently looking at implementing Vitest in #1310 and it is very quick compared to jest.
Still facing various issues with the browser implementation however that shouldn't stop us from using it for node environment tests if we wanted to. |
Given the performance updates and minimal interruption to our current workflows and tooling, we will implement Vitest completely for our node environment tests, and also add support for a browser test however this will not yet run in CI. |
@danielbate Am I tripping, or we're about to become 7.5x times faster (>10mins in CI) by moving to Vitest? ⚡🔥🤘 |
Completed via #1310 |
Although Jest does the job and has done it so far (although slower than I'd like) we should consider seeking a better alternative, possibly more modern and performant. Speed is paramount in tests, and Jest seems to fall short.
Vitest seems a strong candidate:
The text was updated successfully, but these errors were encountered: