Skip to content

feat(test): support capturing coverage from all files #418

@felangel

Description

@felangel

As a developer, I want to be able to run tests and have the reported coverage be absolute rather than just based on the imported paths so that I can have a wholistic overview of the level of test coverage.

Currently, if a file is not imported as part of a test it will never be reported via coverage and will not be reflected in the overall coverage metrics.

Proposal

Introduce a --collect-coverage-from option that will allow developers to control how coverage is collected.

Options

  • imports (default): collect coverage from imported files only
  • all: collect coverage from all files
# Run tests and require 100% coverage across all files
very_good test --min-coverage 100 --collect-coverage-from all

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature or requestgood first issueGood for newcomersp2Important issues not at the top of the work list

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions