Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Latest commit

 

History

History
27 lines (18 loc) · 836 Bytes

File metadata and controls

27 lines (18 loc) · 836 Bytes

it() strings should not start with "should" (no-it-should)

This rule enforces that it() descriptions start with a verb, not with "should".

Rule Details

Descriptions that start with "should" can usually be rewritten more concisely and without loss of information by dropping the "should" and starting with an appropriate verb. This is useful because it reduces the likelihood we'll have to introduce an ugly linebreak that harms readability.

Examples of incorrect code for this rule:

it('should reload after clicking', () => {
	// ...
});

Examples of correct code for this rule:

it('reloads after clicking', () => {
	// ...
});

Further Reading