mocha-only-detector

1.0.1 • Public • Published

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]

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    875
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    875
  • 1.0.0
    0
  • 0.1.0
    14
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i mocha-only-detector

Weekly Downloads

598

Version

1.0.1

License

MIT

Unpacked Size

11.6 kB

Total Files

17

Last publish

Collaborators

  • pose