I have used nyc for getting code coverage for my nodeJs apis written in typescript. I have written test methods for all apis and controllers. Nyc is configured and working fine for getting coverage for controllers but nyc is not covering API code block even after all api having unit tests.
scripts used for running test methods -
"test":"mocha --timeout 99999 -r ts-node/register ./test/**/*.spec.ts --recursive --exit" "coverage":"nyc --reporter text-summary --reporter html --include src npm test"
src contains all the controller and api files.