Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 467 Bytes

expect-matcher.md

File metadata and controls

26 lines (17 loc) · 467 Bytes

Enforce expect having a corresponding matcher call (expect-matcher).

This rule is enabled by default.

Rule details

This rule triggers a warning if expect is called without a matcher.

expect("something");

or when a matcher function was not called:

expect(true).toBeDefined

The following patterns are not warnings:

expect("something").toEqual("something");
expect([1, 2, 3]).toEqual([1, 2, 3]);
expect(true).toBeDefined();