-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathjest-test-external.sh
executable file
·47 lines (36 loc) · 1.51 KB
/
jest-test-external.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
echo "=============================================================================="
echo "Script: $(basename "$0")"
echo "This script runs the jest external tests"
echo "=============================================================================="
# ==============================================================================
# Setup
# ==============================================================================
# Exit immediately if a command exits with a non-zero status.
set -e
# OS settings
if [ "$(uname)" = "Darwin" ]; then
[ -z "$( brew ls --versions findutils )" ] && brew install findutils
[ -z "$( brew ls --versions coreutils )" ] && brew install coreutils
READLINK="greadlink"
XARGS="gxargs"
else
READLINK="readlink"
XARGS="xargs"
fi
SCRIPT_PATH=$( ${READLINK} -f $0 )
SCRIPT_DIR=$( dirname $( ${READLINK} -f $0 ) )
# ==============================================================================
# Inputs
# ==============================================================================
# Variables
echo "Checking variables"
ASSERT_VAR_SCRIPT=$( ${READLINK} -f ${SCRIPT_DIR}/helpers/assert-variable.sh )
export DEBUG_PORT=${DEBUG_PORT:-7000}
export JEST_CONFIG_PATH=${JEST_CONFIG_PATH:-"./jest.ext.config.js"}
# ==============================================================================
# Script
# ==============================================================================
# Run test
echo "External integration testing with jest"
${SCRIPT_DIR}/jest-test.sh --config ${JEST_CONFIG_PATH} $@