Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-no-exclusive-tests

tlvince15MITdeprecated0.1.0

use eslint-plugin-no-exclusive-tests instead

ESLint rule to disallow use of exclusive tests

eslint, rule, jasmine, ddescribe, iit

readme

Disallow use of exclusive tests (no-exclusive-tests)

Jasmine uses ddescribe to only run a specific test suite and iit to only run a specific spec. Whilst handy during development, these can cause unexpected behaviour if accidently committed.

Rule Details

This rule aims to warn whenever it encouters ddescibe, iit, xdescribe and xit.

The following patterns are considered warnings:

ddescribe('My exclusive suite', function() {});

describe('My suite', function() {
    iit('My exclusive spect', function() {});
});

The following patterns are not warnings:

describe('My suite', function() {});
describe('My suite', function() {
    it('My spec', function() {});
});

When Not To Use It

If you're not using a test runner (Jasmine, or a runner with Jasmine-like syntax) or otherwise have steps in place to prevent exclusive tests (e.g. a Git pre-commit hook).

Further Reading