Skip to content

Latest commit

 

History

History
49 lines (25 loc) · 1.22 KB

File metadata and controls

49 lines (25 loc) · 1.22 KB

qunit/no-only

📝 Disallow QUnit.only.

💼 This rule is enabled in the ✅ recommended config.

QUnit.only is useful for restricting a test run to just one test while developing, but committing a test file using this function to a repository is dangerous because it will ensure that the rest of the test suite is not run.

Rule Details

The following patterns are considered warnings:

QUnit.module.only('Name', function() { });

QUnit.only('Name', function() { });

module.only('Name', function() { });

only('Name', function() { });

test.only('Name', function() { });

The following patterns are not considered warnings:

QUnit.module.test('Name', function() { });

QUnit.test('Name', function() { });

module.test('Name', function() { });

test('Name', function() { });

When Not to Use It

If your development pipeline would make running this rule annoying, it could be safely disabled. However, it would be a good idea to ensure that this rule is run in continuous integration at the very least.

Further Reading