redline
MediumTests and CIskipped-test

Skipped test

Skipped test. it.skip turns a test off. Whatever it checked is no longer checked.

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

Flagged
it.skip("handles refunds", ...)
Better
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.

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"
    }
  }
}

Read the source or report a false positive.