Skip to content

Files

Latest commit

 

History

History
30 lines (22 loc) · 596 Bytes

no-focused-tests.md

File metadata and controls

30 lines (22 loc) · 596 Bytes

Pattern: Focused test

Issue: -

Description

Using .only or the f prefix to focus tests is helpful for debugging, but these focused tests should be removed before committing changes to ensure all tests are executed in the test suite.

Examples

Example of incorrect code:

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

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

Example of correct code:

describe("suite", () => {
  test("case", () => {});
});

it("test", () => {});
test("case", () => {});