# jest/no-disabled-tests

> Disallow skipped tests such as `test.skip`, `xtest` and `xdescribe`

A skipped test doesn't run, and the run still passes. `.skip` is useful while you work on something else. If it stays in the code, nobody notices when the behavior it covered breaks.

The rule reports `.skip` on `test`, `it` and `describe`, the `x` prefix (`xtest`, `xit`, `xdescribe`), a test with a title but no function, and calls to Jasmine's `pending()`. `test.todo` is allowed.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"jest/no-disabled-tests" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad {"count": 2} */}
```ts
import { describe, expect, test, xtest } from "@jest/globals";

describe.skip("checkout", () => {
  test("adds the tax", () => {
    expect(total(100)).toBe(108);
  });
});

xtest("applies the coupon", () => {
  expect(total(100, "SAVE10")).toBe(97.2);
});
```

A test with no function has nothing to run:

{/* bad */}
```ts
import { test } from "@jest/globals";

test("refunds the order");
```

Not reported:

{/* good */}
```ts
import { expect, test } from "@jest/globals";

test("adds the tax", () => {
  expect(total(100)).toBe(108);
});

test.todo("refunds the order");
```
