#!/bin/bash

set -e

node node_modules/.bin/istanbul cover _mocha -- -R spec --recursive --require test/common.js

if [ ! -z "$EXPORT_COVERAGE" ]; then
	rm -rf ./coverage
fi

