Skip to content

Commit 7b1b3d5

Browse files
committed
fix: update test.sh
1 parent 73a8fda commit 7b1b3d5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

ci/dev/test.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@ set -euo pipefail
33

44
main() {
55
cd "$(dirname "$0")/../.."
6-
cd test
7-
# We need to make sure the dependencies are installed
8-
# because we run jest from node_modules
9-
yarn
10-
cd test-plugin
6+
pushd test/test-plugin
117
make -s out/index.js
128
# We must keep jest in a sub-directory. See ../../test/package.json for more
139
# information. We must also run it from the root otherwise coverage will not
1410
# include our source files.
15-
cd "$OLDPWD"
11+
popd
12+
if [[ -d ./test/node_modules ]]; then
13+
echo "Found node_modules directory under /test"
14+
else
15+
echo "Did not find node_modules directory under /test"
16+
echo "...Installing test dependencies."
17+
pushd test
18+
yarn
19+
popd
20+
fi
21+
1622
./test/node_modules/.bin/jest "$@"
1723
}
1824

0 commit comments

Comments
 (0)