This PR converts from using jest to a fully jest-compliant replacement: vitest. Vitest has a number of features that provide a superior experience with jest, including:
Lightweight and Fast: Vitest is designed to be lightweight and fast, with minimal overhead and dependencies. This can make it a good choice for small to medium-sized projects or for developers who prioritize speed and simplicity in their test suite.
Simpler Configuration: Vitest has a simpler configuration and fewer options than Jest, which can make it easier to set up and use for developers who are new to testing or who prefer a more minimalistic approach.
TypeScript Support: Vitest has built-in support for TypeScript without requiring any additional configuration, which can be a big advantage for TypeScript projects.
Familiar Syntax: Vitest uses a familiar syntax for writing tests that is similar to Mocha and Jasmine, making it easier for developers who are already familiar with those frameworks to get up and running quickly.
Easy Integration with Other Tools: Vitest integrates easily with other tools in the JavaScript ecosystem, such as webpack, Babel, and ESLint. This can make it a good choice for projects that use these tools and want to minimize the configuration required for their test suite.
This change makes using tests with TypeScript, and ultimately on to ESM, much easier than jest.
⚠️ Also important to note: I've added the dependencies once, in the root package.json. One of the cool aspects of workspaces is our ability to share devDependencies across internal packages, making managing test dependencies much simpler.
Summary
This PR converts from using
jest
to a fully jest-compliant replacement:vitest
. Vitest has a number of features that provide a superior experience withjest
, including:This change makes using tests with TypeScript, and ultimately on to ESM, much easier than
jest
.⚠️ Also important to note: I've added the dependencies once, in the root package.json. One of the cool aspects of workspaces is our ability to share
devDependencies
across internal packages, making managing test dependencies much simpler.