Skip to content

Minimize the use of /* istanbul ignore */ comments #743

Open

Description

@mcmire

Jest uses Istanbul under the hood to scan for and report on test coverage. At any point we can instruct Istanbul to exclude a section of code for consideration in the coverage report. However, long-term doing this is not ideal, and we should remove these directives:

  • Many of the ignored lines/branches are either dead code, or represent important behaviors that are not being tested. We should delete dead code, and test all expected behaviours.
  • The use of ignore comments should be reserved for conditions that are unreachable but still serve a purpose (e.g. type guards, certain validation steps, etc.).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions