Last active
September 1, 2019 15:27
-
-
Save eszterkv/618c000d4adc4d6fb6a242e434c2f9cd to your computer and use it in GitHub Desktop.
Pre-commit git hook that runs all unit tests before commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn test | |
RESULT=$? | |
if [ $RESULT == 1 ]; then | |
echo "Commit rejected: some tests failed. Please fix the tests before committing." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment