Git pre-commit hook that fails if “it.only” used (Jest/Jasmine)
Posted by Jakub Holý on March 27, 2015
One of the annoying things with Jest is that while it enables you to run only a single test by using
it.only, it does not report this in any noticeable way. Thus you can end up in the same situation as we did, not running many tests without knowing it. (Oh yeah, if we only did review the code properly …).
This git pre-commit hook will fail when you introduce
it.only into the code:
4 Responses to “Git pre-commit hook that fails if “it.only” used (Jest/Jasmine)”
Sorry, the comment form is closed at this time.