---
url: /docs/guide/usage/linter/rules/vitest/no-disabled-tests.md
---

### 作用

此规则会对被禁用的测试发出警告。

### 为什么这不好？

Jest 提供了一项功能，允许你临时将测试标记为禁用。这个
功能在调试时或为未来的测试创建占位符时通常很有帮助。在提交更改之前，我们可能希望检查所有测试
都在运行。

### 示例

```js
describe.skip("foo", () => {});
it.skip("foo", () => {});
test.skip("foo", () => {});

describe["skip"]("bar", () => {});
it["skip"]("bar", () => {});
test["skip"]("bar", () => {});

xdescribe("foo", () => {});
xit("foo", () => {});
xtest("foo", () => {});

it("bar");
test("bar");

it("foo", () => {
  pending();
});
```

## 如何使用

## 版本

此规则在 v0.0.7 中加入。

## 参考资料
