Pattern: Focused test
Issue: -
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.
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", () => {});