Skip to content

noSkippedTests (not released)

Diagnostic Category: lint/nursery/noSkippedTests

Inspired from: no-disabled-tests

Disallow disabled tests.

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

describe.skip("test", () => {});
nursery/noSkippedTests.js:1:10 lint/nursery/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", () => {});
nursery/noSkippedTests.js:1:6 lint/nursery/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.only("test", () => {});
test("test", () => {});