Skipped test
This is how the comment reads inline, under the flagged line.
Why it matters
Skipped tests are deleted tests that still look like coverage. They're how a red suite gets turned green without a fix.
What to do
Fix the test or the code. If the test is wrong, delete it and say why.
Examples
it.skip("handles refunds", ...)it("handles refunds", ...)What it catches
It reads a pattern on each line, aware of strings and comments. Languages: TypeScript and JavaScript, Python. Scope: Test files only. These cases are the rule's own tests: the first set must be flagged and the second must not.
Flagged
it.skip("a", () => {});tests/test_a.py
@pytest.mark.skip
def test_a():
assert 1
Left alone
it("a", () => { expect(1).toBe(1); });Research
`.skip`, `xit`, `@pytest.mark.skip`. A skipped test counts as passing while it checks nothing.
- Reward hacking in coding agents (arXiv)
- skill: ci-integrity-audit
Turn it off or change it
In a config file for the CLI, or in the API's rules field:
{
"rules": {
"disable": [
"skipped-test"
],
"severity": {
"skipped-test": "low"
}
}
}
it.skipturns a test off. Whatever it checked is no longer checked.