Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mcmire opened this issue Mar 23, 2022 · 0 comments
Open

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

mcmire opened this issue Mar 23, 2022 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented Mar 23, 2022

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
Projects
None yet
Development

No branches or pull requests

2 participants