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

Move from jest to vitest #5706

Open
14 of 57 tasks
eventualbuddha opened this issue Dec 10, 2024 · 0 comments
Open
14 of 57 tasks

Move from jest to vitest #5706

eventualbuddha opened this issue Dec 10, 2024 · 0 comments

Comments

@eventualbuddha
Copy link
Collaborator

eventualbuddha commented Dec 10, 2024

(See also the official guide)

The motivation for this is not so much any particular problem with jest as the desire to move from targeting CommonJS modules (CJS) to EcmaScript modules (ESM) in our build system:

  • CJS modules interoperate poorly with ESM packages from NPM, of which there are a growing number. This has caused us to use older versions of various packages instead of the latest.
  • Faster native-speed tooling for building TypeScript tends to have poor or non-existent support for CJS. Targeting CJS therefore locks us into using slower build tools.

vitest has a very similar API and DX to jest, but has much better support for ESM. It uses faster native-speed tooling-esbuild at the moment-though the gains appear to be uneven. So I wouldn't necessarily consider this to be a net performance win.

Progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant