During development I often exclude/focus tests. I want to make sure that those tests are not commited.
Every occurence of xdescribe
, fdescribe
, xit
or fit
should trigger an error with the file and line number where it occurred.
Is there a library for this? If not, how would a custom script look like?
Setup:
- husky 1.1.4
- jasmine 2.8.0
- karma 3.0.0
Edit:
I'm not running the tests with pre-commit hooks. I'm worried that someone accidentally checks-in tests with xdescribe
, fdescribe
, xit
or fit
and not all our tests are executed on the build-server.