Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 699 Bytes

no-empty-title.md

File metadata and controls

36 lines (29 loc) · 699 Bytes

Disallow empty titles

Having an empty string as your test title is pretty useless. This rule reports an error if it finds an empty string as s test title.

This rule is not auto-fixable.

Rule Details

The following patterns are considered warnings:

describe('', () => {});
describe('foo', () => {
  it('', () => {});
});
it('', () => {});
test('', () => {});
xdescribe('', () => {});
xit('', () => {});
xtest('', () => {});

These patterns would not be considered warnings:

describe('foo', () => {});
describe('foo', () => {
  it('bar', () => {});
});
test('foo', () => {});
it('foo', () => {});
xdescribe('foo', () => {});
xit('foo', () => {});
xtest('foo', () => {});