Skip to content
This repository was archived by the owner on Dec 8, 2024. It is now read-only.
This repository was archived by the owner on Dec 8, 2024. It is now read-only.

getting istanbul cover to show 0% coverage for files with no tests #112

@0x49c

Description

@0x49c

Hi,

I was very reluctant to open this issue -- it's more of a question really -- but I cannot find an answer to it anywhere. And it seems such a basic thing that I'm sure I'm just missing something in here...

If I have a node project with a couple of .js files. And I have created a single test file which tests a couple of functions from one file only.

The test is a jasmine test, inside test directory, which is run by doing jasmine test. I get my 2 tests, 2 assertions, all ok.

Now I want to get coverage data for my code.

I do istanbul cover jasmine-node -- test and I get coverage results only for the .js file I tested, i.e., I'm getting 83% coverage when in fact there's one file in there that's not even being tested.

So, am I doing this wrong or do I have the wrong expectation here?

Is there a way to get istanbul cover to give me results which reflect also the files which weren't tested?

Many thanks,
L.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions