Skip to content

Files

Latest commit

 

History

History
24 lines (18 loc) · 591 Bytes

valid-title.md

File metadata and controls

24 lines (18 loc) · 591 Bytes

Pattern: Invalid test title

Issue: -

Description

Test block titles must be non-empty strings without leading/trailing spaces and should not be prefixed with their block name. Invalid titles make test output harder to understand.

Examples

Example of incorrect code:

describe("", () => {});
it(" has spaces ", () => {});
test("test: should work", () => {});
describe("describe: my suite", () => {});

Example of correct code:

describe("feature", () => {});
it("should handle edge case", () => {});
test("returns correct value", () => {});