Out of the box testing

Hi! Just installed the 4.0 development version, runs great! So far documentation is smooth, just a few spelling bugs here and there.

Now the question: I’m wondering about out of the box testing capabilities in Adonis. I read that you’re working on it somewhere (can’t remember where), but it’s the one thing that currently keeps me from using Adonis in any larger or production project. It would be amazing if we can do TDD using Adonis!

Hey!

Yes it’s planned and the package is called adonis-vow but it’s still in development.

Adonis vow works out of the box for now, but there are no inbuilt clients for API or Browser testing, but you can use it for unit testing

Thanks! Is there an example how to set this up with Adonis (/test directory structure?) and configuration for the test runner? Also is there a timeframe on the release of adonis-vow and having it included in a new application by default?

The @adonisjs/vow should work out of the box, if you install it today. Just the browser client is not yet ready.

adonis install @adonisjs/vow

and then run following command to run the tests

adonis test
2 Likes

That worked great! Will there be a special docs section for testing? I really like how Laravel tackles this in their docs and out of the box inclusion in a new application.

1 Like