3

I am working on an API that makes use of nyc and mocha. I noticed recently that npm run coverage no longer updates lcov.file and lcov-report folder but it updates every other file/folder in the coverage folder. I can also see that the coverage is being reported on the terminal using --verbose at the end of the coverage script. This is my first time working with test coverage reporters. Any idea how I can fix this will be greatly appreciated.

The test and coverage scripts:

"test": "cross-env NODE_ENV=development nyc --reporter=html --reporter=text mocha -r @babel/register ./src/tests/index.js --timeout 10000 --recursive --exit || true ",
"coverage": "nyc npm test && nyc report --reporter=text-lcov | node ./node_modules/coveralls/bin/coveralls.js --verbose"
Fiyin Akinsiku
  • 166
  • 2
  • 13

1 Answers1

3

UPDATE:

After sharing the question on Twitter, someone suggested that I add --reporter=lcov to the coverage script and that solved it!

Fiyin Akinsiku
  • 166
  • 2
  • 13