slop/skipped-tests
No skipped tests are committed
| Severity | info |
| Tiers | all |
| Stacks | any |
| Scope | root |
| Kind | expr |
| Source | library v0.5.0 |
| Selected by | fleetlint-slop@v0.5.0 |
Requirement
Tests are not skipped unconditionally (it.skip(, xit, @Ignore, @Disabled, [Fact(Skip = ...)], #[ignore], @pytest.mark.skip, skip: true) unless the same line references an issue: #123, ABC-123 or an issue URL. Conditional skips (t.Skip, skipif) are not read.
Why
A skipped test is coverage that the numbers still count and the suite no longer provides.
Check
For each item in:
codegrep("test", r'\b(it|describe|test|context|suite)\.skip\(|\bx(it|describe|context)[\s(]|@Ignore\b|\[Ignore[\](]|@Disabled\b|\bSkip\s*=\s*\x22|#\[ignore\]|@pytest\.mark\.skip(\(|\s*$)|@unittest\.skip\(|\bskip:\s*(true|[\x22\x27])')item.text.matches(r'#\d+|\b[A-Z][A-Z0-9]+-\d+\b|https?://\S+/(issues?|browse|pull|merge_requests)/\S*\d')Fix
Fix or delete the test; if it must be quarantined, reference the issue on the same line.
Agent instruction: Report each skipped test with its reason; do not un-skip tests that then fail without fixing the cause, and do not invent issue numbers.
Sources
- https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-disabled-tests.md (check, no-disabled-tests)
- https://fleetlint.org/baseline/#slop (convention)
- https://fleetlint.org/slop/#tests
Generated by fleetlint docs from catalog v0.5.0.