Last active
July 9, 2016 05:29
-
-
Save galkin/3b76f9f948ae391aef5b29fd18a4ec17 to your computer and use it in GitHub Desktop.
Auto run node test before commit
This file contains 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
#!/bin/sh | |
echo "Running tests" | |
STATUS=0 | |
npm test | |
if [ $? -ne 0 ] | |
then | |
echo "Tests had failed - commit aborted" | |
STATUS=1 | |
fi | |
exit $STATUS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment