コンテンツにスキップ

noSkippedTests

このコンテンツはまだ日本語訳がありません。

biome.json
{
"linter": {
"rules": {
"suspicious": {
"noSkippedTests": "error"
}
}
}
}

Disallow disabled tests.

Disabled tests are useful when developing and debugging, although they should not be committed in production.

The rule detects the following patterns:

  • describe.skip, it.skip, test.skip
  • describe.fixme, it.fixme, test.fixme
  • test.describe.skip, test.describe.fixme
  • test.describe.parallel.skip, test.describe.serial.skip
  • test.describe.parallel.fixme, test.describe.serial.fixme
  • test.step.skip, test.step.fixme
  • xdescribe, xit, xtest
  • Bracket notation: test["skip"], test["fixme"]
  • Bare test.skip() / test.fixme() calls (0 arguments)
describe.skip("test", () => {});
code-block.js:1:10 lint/suspicious/noSkippedTests  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don’t disable tests.

> 1 │ describe.skip(“test”, () => {});
^^^^
2 │

Disabling tests is useful when debugging or creating placeholder while working.

If this is intentional, and you want to commit a disabled test, add a suppression comment.

Unsafe fix: Enable the test.

1 - describe.skip(test,·()·=>·{});
1+ describe(test,·()·=>·{});
2 2

test.skip("test", () => {});
code-block.js:1:6 lint/suspicious/noSkippedTests  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don’t disable tests.

> 1 │ test.skip(“test”, () => {});
^^^^
2 │

Disabling tests is useful when debugging or creating placeholder while working.

If this is intentional, and you want to commit a disabled test, add a suppression comment.

Unsafe fix: Enable the test.

1 - test.skip(test,·()·=>·{});
1+ test(test,·()·=>·{});
2 2

test.fixme("needs fixing", async () => {});
code-block.js:1:6 lint/suspicious/noSkippedTests  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Don’t disable tests.

> 1 │ test.fixme(“needs fixing”, async () => {});
^^^^^
2 │

Disabling tests is useful when debugging or creating placeholder while working.

If this is intentional, and you want to commit a disabled test, add a suppression comment.

Unsafe fix: Enable the test.

1 - test.fixme(needs·fixing,·async·()·=>·{});
1+ test(needs·fixing,·async·()·=>·{});
2 2

test.only("test", () => {});
test("test", () => {});