#!/bin/sh echo "Running test suite" for t in test/*-test.js; do echo echo "Running $t..." output=`node $t` code=$? if [ $code -ne 0 ]; then echo " $(tput setaf 1)$t failed (exit code: $code)$(tput sgr0)" echo "Output:" echo $output exit 1 else echo " $(tput setaf 2)$t OK$(tput sgr0)" fi done