Skip to content

Instantly share code, notes, and snippets.

@galkin
Last active July 9, 2016 05:29
Show Gist options
  • Save galkin/3b76f9f948ae391aef5b29fd18a4ec17 to your computer and use it in GitHub Desktop.
Save galkin/3b76f9f948ae391aef5b29fd18a4ec17 to your computer and use it in GitHub Desktop.
Auto run node test before commit
#!/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