node-typescript-boilerplate
node-typescript-boilerplate copied to clipboard
Switch from Jest to Vitest
I now recommend using Vitest over Jest for unit and integration testing of TypeScript code. This PR has breaking changes and replaces Jest with Vitest.
Throughout 2023, my team and I gradually switched from Jest to Vitest in all the projects. We've found out that generally, Vitest is faster than Jest, especially for large test suits. Furthermore, Vitest has native support for ES modules, is easier to configure, and has a much nicer developer experience when used with TypeScript. For example, when working with mocks, spies and types.