Skip to content

Make DENO_COVERAGE_DIR public #11560

Open
@caspervonb

Description

@caspervonb

The DENO_UNSTABLE_COVERAGE_DIR is the environment variable that actually controls if coverage collection takes place or not. It has a terrible name and is not documented anywhere as it is not considered public at the moment.

Using an environment variable is the most common way to determine if coverage should be collected and where it should be collected too.

This implies that we remove deno test --coverage which was kept for backwards compatibility in 1.x.
The removal of the coverage flag would probably have to be a 2.0 change.

Usage would be:

export DENO_COVERAGE_DIR="some/path"
deno run ...
deno test ...
deno test ...
deno coverage --lcov > cov.lcov

Metadata

Metadata

Assignees

No one assigned

    Labels

    suggestionsuggestions for new features (yet to be agreed)testingrelated to deno test and coverage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions