Permalink
3929bf5 Jan 24, 2015
1 contributor

Users who have contributed to this file

31 lines (21 sloc) 711 Bytes

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

Jasmine uses xdescribe and xit to disable a suite/spec.

Whilst handy to toggle a broken suite/spec during development, disabled tests are often an indicator of a deeper problem.

Rule details

This rule triggers a warning (is set to 1 by default) whenever it encounters xdescribe and xit.

The following patterns are considered warnings:

xdescribe('My disabled suite', function() {});

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

The following patterns are not warnings:

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