Skip to content

coverage: add --threshold=<percentage> option to deno coverage #29076

Open
@kt3k

Description

@kt3k

Follow up of #21325

It'd be good to have --threshold=<percentage> option in deno coverage (and also --coverage-threshold=<percentage> in deno test --coverage).

If the option specified, the process will fail when the coverage number is below the given threshold.

Note:

  • jest, nyc, and c8 have configurations for this behavior.
    • These tools allow users to configure them based on 4 different coverage numbers: line coverage, function coverage, branch coverage, and statement coverage. (I think this granularity is overkill. It'd be enough to only allow setting this for line coverage, which seems most commonly used)

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