Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 638 Bytes

no-global-expect.md

File metadata and controls

29 lines (15 loc) · 638 Bytes

Forbid the use of global expect (no-global-expect)

QUnit 2.0 is deprecating and removing the global expect function. This rule will warn when the global expect function is used.

Rule Details

The following pattern is considered a warning:

expect(1);

The following pattern is not considered a warning:

assert.expect(1);

When Not to Use It

This rule can be safely disabled if you want to tolerate global expect calls, especially if your codebase does not use QUnit 2.0 syntax yet.

Further Reading