Test coverage: How to set nyc for AdonisJS?


#1

Even if I am not fond of the test coverage concept, I would like to implement it for my AdonisJs projects.

Does anyone know how to set nyc for AdonisJs ?
I read this post but the author did not share how he did it.

Thank you,
Billal BEGUERADJ.


#2

What issues are you facing?


#3

I think from what you said here I am not going to use nyc because it will force me to use other things (Jest, Mocha …) than @adonisjs/vow; is my understanding right, @virk


#4

What have you tried so far?


#5

From my understanding, if I use nyc that will mean I will abandon adonis/vow, is this right @virk If so, I will not use nyc


#6

I’m using nyc together with vow…

I just run nyc node ace test --bail and thats it…


#7

It seems that close to the solution, but I am getting this error message: error: ace is not a registered command @hlozancic

Even if I run npm i --save @adonisjs/ace

I just noticed this is enough for testing: nyc adonis test --bail

But then I do not understand that ace stuff which is in package.json by default


#8

You need to have '@adonisjs/vow/providers/VowProvider', inside your start/app.js aceProviders