An issue is raised when two tests in the same suite have the same title.

Why is this an issue?

Duplicate test titles make failures ambiguous. Test reports, CI logs, and IDE integrations usually identify a test by its suite path and title. If two tests in the same suite share a title, the failure output does not clearly show which test failed.

What is the potential impact?

Developers spend more time locating the failing test, which slows debugging and reduces confidence in the test suite.

How to fix it

Give each test in a suite a distinct title.

Code examples

Noncompliant code example

describe('shopping cart', () => {
  it('adds an item', () => {});
  it('adds an item', () => {}); // Noncompliant
});

Compliant solution

describe('shopping cart', () => {
  it('adds an item to an empty cart', () => {});
  it('adds an item to an existing cart', () => {});
});

Resources

Documentation