eslint-no-exclusive-testsdeprecated

ESLint rule to disallow use of exclusive tests

Usage no npm install needed!

<script type="module">
  import eslintNoExclusiveTests from 'https://cdn.skypack.dev/eslint-no-exclusive-tests';
</script>

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