* chore: replace node by `yarn node` * chore: fix tsc command * chore: use `yarn` to wrap node * chore: supress yarn run output * chore: disable silent mode for builtin yarn command
27 lines
446 B
Bash
Executable File
27 lines
446 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
node="yarn --silent node"
|
|
jestArgs=()
|
|
|
|
if [ "$TEST_DEBUG" ]; then
|
|
node="$node --inspect-brk"
|
|
jestArgs+=("--runInBand")
|
|
fi
|
|
|
|
if [ -n "$CI" ]; then
|
|
jestArgs+=("--maxWorkers=4")
|
|
jestArgs+=("--ci")
|
|
fi
|
|
|
|
if [ -n "$TEST_GREP" ]; then
|
|
jestArgs+=("-t")
|
|
jestArgs+=("$TEST_GREP")
|
|
fi
|
|
|
|
if [ -n "$TEST_ONLY" ]; then
|
|
jestArgs+=("(packages|codemods|eslint)/.*$TEST_ONLY.*/test")
|
|
fi
|
|
|
|
$node node_modules/.bin/jest "${jestArgs[@]}"
|