#!/bin/sh

set -e

echo ""

(proof run t/*/*.t.js | tee .proof.out | proof progress) || (proof errors < .proof.out) || exit 1

if [ "$TRAVIS" = "true" ]; then
  echo "running with coverage"
  t/cover

  echo "submitting to coveralls.io"
  (cat coverage/lcov.info | node_modules/.bin/coveralls) > /dev/null 2>&1
fi

echo ""
