Skip to content

How do I collect code coverage from subql-node test ? #2712

Description

@atodorov

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:

  1. Follow the instructions at https://www.npmjs.com/package/@istanbuljs/nyc-config-typescript

  2. .nycrc:

{
    "extends": "@istanbuljs/nyc-config-typescript",
    "all": true
}
  1. Add "sourceMap": true in tsconfig.json

My command line is nyc --require ts-node/register --require source-map-support/register subql-node test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions