Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 996 Bytes

File metadata and controls

42 lines (24 loc) · 996 Bytes

qunit/no-qunit-stop

📝 Disallow QUnit.stop.

💼 This rule is enabled in the ✅ recommended config.

QUnit's handling of asynchronous tests used to be via tracking a global semaphore and not starting a test until the previous test had decremented the semaphore. However, in order to avoid tests interfering with each other, QUnit.stop() (and also QUnit.start()) have been deprecated (to be removed in 2.0) and have been replaced with assert.async().

Rule Details

The following patterns are considered warnings:

QUnit.stop();

QUnit.stop(2);

The following patterns are not warnings:

var done = assert.async();

When Not To Use It

This rule may be safely disabled if you are working in a legacy codebase that will not migrate to QUnit 2.0.

Further Reading