digital-loukoum / esrun

Simple wrapper around esbuild to execute a Typescript file
MIT License
171 stars 11 forks source link

Idea: Jest Support #30

Closed exsurgo closed 1 year ago

exsurgo commented 1 year ago

ESRun should support Jest out-of-the-box.

Jest seems to be the primary test framework for Node these days. It would be great to have ESRun just work with it, without any additional setup or configs.

I tried to get it to work with ESRun, but was unsuccessful. Perhaps it could be implemented to work as a --loader? I was able to get my own TypeScript/ESM/Mapped Paths setup working with ts-jest, but it took a good amount of trial and error effort.

Gin-Quin commented 1 year ago

That's rather a Jest issue than a Esrun issue. Jest is losing popularity and it uses some old tools like babel, I'm not surprised it's not compatible with Typescript.

Some ways to go: