-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eslint): Add lint rules for disabled or focused tests (#8489)
We sometimes forget to remove focused or disabled annotations after debugging tests. This of course isn't ideal and as brought up in #8485 we should add checks against this. Therefore, this patch: * Adds the [`eslint-plugin-jest` package ](https://github.com/jest-community/eslint-plugin-jest/tree/main)which contains a bunch of jest-syntax-specific rules * Enables the `no-focused-tests` rule to throw a lint error if a test is focused with `it.only`, `fit` or similar functions. * Enables the `no-disabled-tests` rule to throw a lint error if a test (suite) from a suite is disabled/skipped with `it.skip`, `xit` or similar functions. While we sometimes skip tests on purpose, I'd argue that we generally want to avoid this, as it can also happen accidentally. For the few exceptions of this rule, we can always ignore it.
- Loading branch information
Showing
5 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters