bitjson / typescript-starter

Quickly create and configure a new library or Node.js project
https://bitjson.github.io/typescript-starter/
MIT License
3.48k stars 245 forks source link

Add option to use jest instead of ava #140

Closed kristianmandrup closed 5 years ago

kristianmandrup commented 5 years ago

Tried to use this generator and switch from ava to jest but completely stuck as per this issue.

What gives?

bitjson commented 5 years ago

Hey @kristianmandrup, thanks for opening an issue!

I'd love to take a PR to add Jest as an option. I don't really use it outside of React projects myself, so I've not bothered adding it here.

If you haven't tried AVA, I really recommend it – the API is imported like a normal package, rather than being injected into the global context. I find it usually makes tests cleaner and easier for new contributors to jump right in.

Other than that, you might like this starter project which is also structured in more the "Jest way": https://github.com/alexjoverm/typescript-library-starter

kristianmandrup commented 5 years ago

Hey, @bitjson I came from ava and switched to jest some time ago when I got back into React. Seems to be the standard in the react community. Never looked back. Jest has huge JS community support, with fancy editor plugins and more. I'll look at the lib you recommended as an alternative. Cheers.