File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,22 @@ set -euo pipefail
3
3
4
4
main () {
5
5
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
11
7
make -s out/index.js
12
8
# We must keep jest in a sub-directory. See ../../test/package.json for more
13
9
# information. We must also run it from the root otherwise coverage will not
14
10
# 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
+
16
22
./test/node_modules/.bin/jest " $@ "
17
23
}
18
24
You can’t perform that action at this time.
0 commit comments