-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·30 lines (24 loc) · 664 Bytes
/
test.sh
File metadata and controls
executable file
·30 lines (24 loc) · 664 Bytes
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
#!/bin/sh
set -eu
NODE="node --no-warnings=ExperimentalWarning"
$NODE test-fixtures.js teardown
$NODE test-fixtures.js setup
cleanup() {
echo "cleaning DB objects"
$NODE test-fixtures.js teardown
}
trap cleanup EXIT 1 2 3 6
if [ $# -ge 1 ]; then
if [ "$1" = "watch" ]; then
$NODE --test --watch
else
$NODE --test --test-reporter=spec "$1"
fi
else
# if [ -n "$GITHUB_WORKFLOW" ]; then
# npm i --no-save node-test-github-reporter
# $NODE --test --test-reporter=node-test-github-reporter
# fi
$NODE --test --test-reporter=spec lib/*.test.js routes/*.test.js
fi
# npx mocha --exit --no-warnings=ExperimentalWarning lib/*.test.js routes/*.test.js