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?


#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