#!/usr/bin/env bash set -e port=3999 script/server -p "$port" &>/dev/null & pid=$! trap "kill $pid" EXIT INT while ! lsof -i :$port >/dev/null; do sleep .05 done phantomjs ./test/run-qunit.coffee "http://localhost:$port/"