#!/usr/bin/env bash # Runs all headless browser suites. Starts the dev server on :8080 if it isn't running. set -u cd "$(dirname "$0")/.." OUT="${1:-${TMPDIR:-/tmp}}" if ! curl -s -o /dev/null http://localhost:8080/; then node serve.js 8080 >/dev/null 2>&1 & SERVER=$! trap 'kill $SERVER' EXIT sleep 1 fi status=0 for suite in functional tools ui features; do echo "=== $suite" node "dev/$suite.js" "$OUT" 2>&1 | grep -v willReadFrequently || status=1 [ "${PIPESTATUS[0]}" -eq 0 ] || status=1 done exit $status