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

Swap from Jest to vitest #407

Closed
r59q opened this issue Dec 4, 2023 · 0 comments · Fixed by #427
Closed

Swap from Jest to vitest #407

r59q opened this issue Dec 4, 2023 · 0 comments · Fixed by #427
Milestone

Comments

@r59q
Copy link
Collaborator

r59q commented Dec 4, 2023

Jest has become a configuration nightmare, requiring separate compilation configuration in order to work. Upon merging #400 many jest tests broke, mostly regarding svelte and i18n, I was able to fix some of them. It was caused due to an inherent enforcement of CJS , as #400 will change the package module type from ES6 to esnext. Luckily most of the jest tests should be compatible with vitest, so it should be a relatively easy transition

Some of the benefits of vitest compared to jest

  • It is faster
  • It is designed to work with vite
  • It is designed to work with ESM and ECMAScript and thereby much more modern

The core of the issue is top-level awaits. See the following for a reference of the issue kulshekhar/ts-jest#2057. It is marked as closed, but the issue persists as no solution can reliably fix this issue.

NOTE: When attempting to solve this issue, check to see if the issue can be resolved using updates to TS/Jest/ts-jest, etc.

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

Successfully merging a pull request may close this issue.

1 participant