I am trying to collect code coverage metrics from subql-node test in my project.
So far I've experimented with nyc but the produced report is shown as 0% coverage. Here's my config:
-
Follow the instructions at https://www.npmjs.com/package/@istanbuljs/nyc-config-typescript
-
.nycrc:
{
"extends": "@istanbuljs/nyc-config-typescript",
"all": true
}
- Add
"sourceMap": true in tsconfig.json
My command line is nyc --require ts-node/register --require source-map-support/register subql-node test.