All you have to do is add a target scriptin package.jsonthat the reporter uses:
"script": {
...
"coverage:teamcity": "nyc --reporter=teamcity mocha ...etc..."
...
}
Then in the build step just call it via the command line npm run coverage:teamcity
Teamcity will automatically analyze the output and generate a coverage summary for you.
source
share