ava-ts
ava-ts copied to clipboard
Support AVA 1.x or deprecate ava-ts
The latest version of AVA is currently 1.1.0, and ava-ts only supports 0.* (which currently resolves to AVA 0.25.0)
I see that AVA 1.0 seem to have support for running ts files directly. Does this deprecate ava-ts entirely?
Very good question indeed. Not sure yet: Might be convenient to have ava-ts as just a tiny wrapper around the ava cli, setting the right settings to match the *.ts files.
Or it might be too little added value and should be deprecated... Will give it some thought. Feel free to discuss here 👇
Ok, I finally used AVA v1.0 with TypeScript a few times and came to a conclusion: It works quite well, but some details were annoying.
I had to copy and paste a few config options every time (require ts-node, *.ts extensions, disable compile enhancements) and the default file matching patterns only match *.js test files, of course.
Conclusion: There will be AVA-TS v1.0 and I basically implemented it already.
Have a look at the v1.0 branch. You can already try it by installing it as:
npm install --save-dev ava-ts@next
It's not a fork of AVA anymore, but just a small, a little bit hacky wrapper around the AVA CLI. Give it a try if you have some time and please share your feedback! 🚀
Memo to myself: Should support the ts-node options as CLI options.
Just a note if anyone else has an issue, version 1.0.0-rc fixed an issue I was having with throwsAsync not existing; since I'm guessing the version of ava in the latest official release wasn't supported yet.