# vitest/no-disabled-tests

> Disallow skipped tests such as `test.skip` and `describe.skip`

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`, and a test with a title but no function. `test.todo` and `test.skipIf(condition)` are 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]
"vitest/no-disabled-tests" = "error" # or "warn"
```

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

## Examples

Reported:

{/* bad {"count": 2} */}
```ts
import { describe, expect, test } from "vitest";

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

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

A test with no function has nothing to run:

{/* bad */}
```ts
import { test } from "vitest";

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

Not reported:

{/* good */}
```ts
import { expect, test } from "vitest";

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

test.todo("refunds the order");

test.skipIf(process.platform === "win32")("follows the symlink", () => {
  expect(resolve("current")).toBe("releases/42");
});
```
