aws-sdk-js-v3
aws-sdk-js-v3 copied to clipboard
Explore alternatives of Jest for unit testing
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
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 :-)
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.