Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 993 Bytes

no-qunit-stop.md

File metadata and controls

40 lines (23 loc) · 993 Bytes

Disallow QUnit.stop (qunit/no-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