Skip to content

Detect 'describe.only' and 'it.only' statements in your mocha tests.

License

Notifications You must be signed in to change notification settings

asmclean/mocha-only-detector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mocha-only-detector

Detect forgotten describe.only and it.only in mocha tests.

Install

npm i -g mocha-only-detector

Usage

If given two files:

// foo.js
describe.only('Foo', function () {
  it('should foobaz bar', function (done) {
    // ...
    done();
  });
});
// bar.js
describe('bar', function () {
  it('should foobar', function (done) {
    // ...
    done();
  });
});

Then running:

$ mocha-only-detector foo.js bar.js

will return the following error output and a non-zero exit code:

[Error: Error while checking foo.js: Contains describe.only or it.only]

About

Detect 'describe.only' and 'it.only' statements in your mocha tests.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%