fix(tests): Use higher test timeout under Windows Subsystem for Linux

This commit is contained in:
Ryan Kelly 2018-02-06 13:49:52 +11:00
Родитель 924e8ca4ee
Коммит c9baa0054c
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -7,12 +7,20 @@ if [ -z "$CORS_ORIGIN" ]; then export CORS_ORIGIN="http://foo,http://bar"; fi;
set -u
glob=$*
if [ -z "$glob" ]; then
glob="test/local test/remote"
GLOB=$*
if [ -z "$GLOB" ]; then
GLOB="test/local test/remote"
fi
DEFAULT_ARGS="-R dot --recursive"
# When running under Windows Subsystem for Linux,
# some tests take unusually long to complete.
if uname -a | grep -q 'Microsoft'; then
DEFAULT_ARGS="$DEFAULT_ARGS --timeout 5000"
fi
./scripts/gen_keys.js
./scripts/gen_vapid_keys.js
./scripts/mocha-coverage.js -R dot --recursive $glob
./scripts/mocha-coverage.js $DEFAULT_ARGS $GLOB
grunt eslint copyright