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

Migrate off Jest #3022

Open
NullVoxPopuli opened this issue Feb 14, 2024 · 3 comments
Open

Migrate off Jest #3022

NullVoxPopuli opened this issue Feb 14, 2024 · 3 comments

Comments

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Feb 14, 2024

Jest integration with anything is pretty bad

image

We should move to vitest or something that works with javascript by default.

This is using https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest

@NullVoxPopuli
Copy link
Contributor Author

oh no, now it's in the terminal
image

@bmish
Copy link
Member

bmish commented Feb 15, 2024

Our unit tests have to be run with npm run test:jest to avoid those errors. This is following the instructions of https://jestjs.io/docs/ecmascript-modules for ESM support.

It looks like the VSCode extension can be instructed to use that command with an option: https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest#jestcommandline

We migrated from Mocha to Jest years ago:

We have a lot of tests and use a lot of Jest features like various assertions, snapshot testing, and test coverage enforcement. So it's probably not worth the effort to try to migrate to something else.

Hopefully Jest will streamline ESM support so things work better by default, if they haven't already.

@NullVoxPopuli
Copy link
Contributor Author

Vitest supports jest's API and has those features and more tho

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

No branches or pull requests

2 participants