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

Explore alternatives of Jest for unit testing #3208

Closed
trivikr opened this issue Jan 18, 2022 · 2 comments
Closed

Explore alternatives of Jest for unit testing #3208

trivikr opened this issue Jan 18, 2022 · 2 comments
Labels
feature-request New feature or enhancement. May require GitHub community feedback. p2 This is a standard priority issue

Comments

@trivikr
Copy link
Member

trivikr commented Jan 18, 2022

Is your feature request related to a problem? Please describe.

Jest has been associated with multiple issues:

  • Folks in Node.js community don't like Jest mainly because it injects globals and rewires the complicated module system. Also, the project owner Facebook reduced the funding for jest sometime in 2018-2019, and the project is primarily run by volunteers and Open Collective.
  • Long history of jest discussing memory leaks.
  • Our existing tests have memory leak.
  • Jest force exits when run in workspace.

Describe the solution you'd like

Explore alternatives of Jest which are easy to migrate to:

  • The vite team has done great job with multiple projects in the past, and as of Jan 2022 the vitest framework has good reviews.
  • We've been using mocha for writing browser tests. It has been among the popular test frameworks in JavaScript ecosystem for long.
  • The tape and tap has been other test frameworks preferred by JS community.

Describe alternatives you've considered

  • Keep using jest, and find fixes/workarounds to the existing issues.
  • Explore bindings alternative to ts-jest, like babel-jest or @swc/jest
@trivikr trivikr added the feature-request New feature or enhancement. May require GitHub community feedback. label Jan 18, 2022
@philiiiiiipp
Copy link

philiiiiiipp commented Sep 5, 2022

We where using jest for the past years and noticed immense memory leaks especially when importing the aws-sdk, both v2 and v3. After stumbling over this issue a day ago, I tried all of your suggestions. vitest reduced our memory consumption from >25GB to <1GB with relatively minimal effort. The syntax is very close to jest's so just full-text replacing jest. to vi. made already 90% of our tests go.

So, very thanks for this suggestion :-)

@RanVaknin RanVaknin added the p2 This is a standard priority issue label Mar 15, 2023
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or enhancement. May require GitHub community feedback. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

4 participants