noSkippedTests
Это содержимое пока не доступно на вашем языке.
Summary
Section titled “Summary”- Rule available since:
v1.6.0 - Diagnostic Category:
lint/suspicious/noSkippedTests - This rule isn’t recommended, so you need to enable it.
- This rule has an unsafe fix.
- The default severity of this rule is warning.
- This rule belongs to the following domains:
- Sources:
- Inspired from
jest/no-disabled-tests - Inspired from
vitest/no-disabled-tests - Inspired from
playwright/no-skipped-test
- Inspired from
How to configure
Section titled “How to configure”{ "linter": { "rules": { "suspicious": { "noSkippedTests": "error" } } }}Description
Section titled “Description”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.skipdescribe.fixme,it.fixme,test.fixmetest.describe.skip,test.describe.fixmetest.describe.parallel.skip,test.describe.serial.skiptest.describe.parallel.fixme,test.describe.serial.fixmetest.step.skip,test.step.fixmexdescribe,xit,xtest- Bracket notation:
test["skip"],test["fixme"] - Bare
test.skip()/test.fixme()calls (0 arguments)
Examples
Section titled “Examples”Invalid
Section titled “Invalid”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", () => {});Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.