2.0.0 • Published 3 years ago

no-skipped-tests v2.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

no-skipped-tests

Analyzes your project for focused or ignored tests.

npm version dependency status travis ci build status Codecov Known Vulnerabilities license

What it does

Have you ever committed focused or ignored tests by accident? Do you always forget to remove those fdescribe or xit statements?

The no-skipped-tests is here to help; it is a NodeJS-based command line tool which checks your tests for focused or ignored test suites and test cases. Once integrated in your Continuos Integration Platform, we can make sure all the tests are being executed with every build.

No Skipped Tests Success Preview

No Skipped Tests Error Preview

How to install

You can get no-skipped-tests via npm by either adding it as a new devDependency to your package.json file and running npm install, or running the following command:

npm install no-skipped-tests --save-dev

Requirements

  • no-skipped-tests requires at least NodeJS 7.6 (or higher). Earlier 7.x versions of NodeJS (7.0 to 7.5) might also work when executing no-skipped-tests using the --harmony-async-await flag.

How to use

Using no-skipped-tests is very straightforward: Simply call it within one of the scripts of your package.json file. For instance, you can let it get executed automatically before every test by using the pretest script:

{
  "scripts": {
    "pretest": "no-skipped-tests"
  }
}

Alternatively, you can also run it manually:

npm run pretest

Configuration

By default, no-skipped-tests will analyue all test files within your source folder: src/**/*.spec.@(ts|js). However, your project might have a different naming convention or directory structure. Thus, you might provide a custom file pattern instead. For instance:

{
  "scripts": {
    "pretest": "no-skipped-tests src/app/**/*.test.ts"
  }
}

Creator

Dominique Müller