Skip to content

deno test --coverage only includes files for which tests exist #14281

@dhardtke

Description

@dhardtke

Description
When running deno test --coverage some files are not included in the resulting JSON files.
As a developer I also want to see completely uncovered files in my codecov report.

Reproduction

git clone https://github.com/dhardtke/prandium.git
cd prandium
deno test --coverage=./cov --unstable --allow-all
grep -r "index.controller.ts" cov

index.controller.ts is not tested (yet) and does not appear in the JSON files and the resulting lcov report.

Possible Workaround
A workaround might be to explicitly provide the list of all files to deno test, regardless of whether they include tests or not.

Side Note
What's odd is that I had a couple of executions of deno test --coverage where it did generate JSON files for the index.controller.ts but I am no longer able to reproduce this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlytestingrelated to deno test and coverage

    Type

    No fields configured for bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions