Comparison with SWC/jest
Clear and concise description of the problem
in comparisons page, I would like to see a comparison with https://www.npmjs.com/package/@swc/jest
Suggested solution
compare a set of tests with https://www.npmjs.com/package/@swc/jest
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Would like to know, if/how is it possible to use vitest with TypeScript support while using SWC for compiling a project.
Currently, I'm using jest and @swc/jest for testing my Node.js fastify API REST application but there are many issues with jest and vitest is really looking great and modern! Actually, jest is stopping my project to use ESM modules imports "type": "module" in my package.json.
vitest seems to solve this issue (and of course with many other great improvements).
Is it possible/recommended to use vitest without vite and not for frontend but for backend code?
How can I use SWC for compiling my project, but still configure vitest for testing, and is it viable/good to do so?
Thanks for your replies! :smile:
You can use Vite plugins to compile your project, like this: https://github.com/wight554/vitest-nestjs-testing/commit/9e4d1e5f6c4b723b972aa470aed2ef3d3986476e (haven't tested it)
I don't think this comparison is needed in documentation because you can also use SWC transformer in Vitest, so comparing Vitest and Jest is enough.