Test all the units!
Gergely Nemeth

I tried all the steps, my coverage works for a single test file that is in root folder, else I get “No coverage information was collected, exit without writing coverage information

My folder structure is

 — node_modules/
 — coverage/
 — server/
 — — app.js
 — test/
 — — index.test.js
 — test.js

When I run

istanbul cover _mocha test.js

I get a coveraga report however If I try to tun

istanbul cover _mocha test/*.js
istanbul cover _mocha test/index.test.js

I don’t get any coverage report

I tried all hit and trial its not working ant work around for the same

Like what you read? Give atul joshi a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.