Skip to content

A tslint rule to nag you when you forget that you have focused some Jasmine tests with 'fdescribe' or 'fit'

License

Notifications You must be signed in to change notification settings

Sergiioo/tslint-defocus

Repository files navigation

Build Status NPM Version License

tslint-defocus

About

This is a tslint rule that warns about focussed Jasmine tests - fdescribe and fit

Usage

  • Install with: npm install tslint-defocus --save-dev or yarn add tslint-defocus --dev
  • Extend this package in your .tslint.json file, e.g.:
  "extends": [
    "tslint-defocus"
  ],
  "rules": {
    "defocus": true,
    ...

(as per the instructions for custom rules)

  • Run tslint as you usually would (gulp plugin, directly from node, etc)
  • If you forget to remove a call to fdescribe or fit then you will see something like from tslint:
(defocus) app.ts[4, 1]: Calls to 'fdescribe' are not allowed.
(defocus) app.ts[8, 5]: Calls to 'fit' are not allowed.

Dependencies

Version 2.0.x of this rule requires version 5.x of tslint.

Developer instructions

  • installed the required global npm packages: npm install gulp --global --no-optional.
  • Clone from github
  • Run npm install or yarn install to install and get started
  • This repo uses npm scripts for its build. Try yarn build and yarn test.
  • There are also watch mode variants - yarn build:watch and yarn test:watch.

License

MIT

About

A tslint rule to nag you when you forget that you have focused some Jasmine tests with 'fdescribe' or 'fit'

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published