Skip to content

Instantly share code, notes, and snippets.

@nielk
Created December 18, 2014 13:43
Show Gist options
  • Save nielk/686cced24384df5eec80 to your computer and use it in GitHub Desktop.
Save nielk/686cced24384df5eec80 to your computer and use it in GitHub Desktop.
pre-commit test js
# pre-commit: run casperjs tests
echo "**********************************"
echo "pre commit ..."
echo "**********************************"
if [ -x "$(command -v casperjs)" ]; then
echo "**********************************"
echo "executing test"
echo "**********************************"
git stash -q --keep-index
casperjs test integration/test/test.js
RESULT=$?
git stash pop -q
[ $RESULT -ne 0 ] && exit 1
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment