#!/bin/bash # Runs the mocha tests if [ $BASH_ARGV ]; then if [ -e "$BASH_ARGV" ]; then FILES=$BASH_ARGV else FILES=$(find src -name "*$BASH_ARGV*.test.js") fi echo Running test for $FILES else echo Running all tests... FILES=$(find src -name "*.test.js") fi mocha --reporter spec --compilers js:babel-register $FILES --require babel-polyfill