Last active
August 29, 2015 14:07
-
-
Save stringparser/695420dec0d532cbee7d to your computer and use it in GitHub Desktop.
bdd minimal tests
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 | |
# taked from TJ | |
# https://github.com/visionmedia/commander.js/blob/master/test/run | |
export NODE_ENV=test | |
echo | |
for file in $@; do | |
printf " \033[90m${file#test/}\033[0m\n --- \n" | |
node $file 2> /tmp/stderr && echo "\n --- \n \033[36m✔\033[0m all passed" | |
code=$? | |
if test $code -ne 0; then | |
echo "\n --- \n\033[31m ✖ fail!\033[0m" | |
cat /tmp/stderr >&2 | |
exit $code | |
fi | |
done | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment