Output coverage report from tests


#1

Hi guys!

I’ve written a simple unit test in a new AdonisJS app (4.1.0):

Now I’m trying to figure out how can I output some kind of code coverage report for these tests.

Have anyone else dealt with this?


Test coverage: How to set nyc for AdonisJS?
#2

Nevermind, I just used nyc, configured a basic .nycrc file and it worked like a charm:

:grinning:


#3

I’m starting an API Rest with the Adonis-CLI template for APIs

But I would like to add to the project to validate my code:

  • ESLint
  • code coverage with the NYC

Do you have an example for this?


#4

Follow eslint instructions on how do it.
Nyc is just shared above your message


#5

@Zizaco Could you please share information about how you succeeded to set nyc for AdonisJs ? Thank you.