Skip to content

Latest commit

 

History

History
33 lines (17 loc) · 830 Bytes

no-global-expect.md

File metadata and controls

33 lines (17 loc) · 830 Bytes

Disallow global expect (qunit/no-global-expect)

💼 This rule is enabled in the ✅ recommended config.

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