From 1b1b5735d93b2550a7bb78d59fc43798650f2dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 29 Nov 2019 18:12:14 -0500 Subject: [PATCH] chore: use `yarn` to wrap node --- scripts/test-cov.sh | 3 ++- scripts/test.sh | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/test-cov.sh b/scripts/test-cov.sh index 6914ef3fb0f9..5d2aec8e3840 100755 --- a/scripts/test-cov.sh +++ b/scripts/test-cov.sh @@ -1,10 +1,11 @@ #!/bin/bash set -e +node="yarn node" jestArgs="--coverage" if [ -n "$CI" ]; then jestArgs="${jestArgs} --maxWorkers=4 --ci" fi -node_modules/.bin/jest $jestArgs +$node node_modules/.bin/jest $jestArgs diff --git a/scripts/test.sh b/scripts/test.sh index b14189e28a70..ecbd94291614 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,11 +1,11 @@ #!/bin/bash set -e -node="node" +node="yarn node" jestArgs=() if [ "$TEST_DEBUG" ]; then - node="node --inspect-brk" + node="$node --inspect-brk" jestArgs+=("--runInBand") fi @@ -23,4 +23,4 @@ if [ -n "$TEST_ONLY" ]; then jestArgs+=("(packages|codemods|eslint)/.*$TEST_ONLY.*/test") fi -$node node_modules/jest/bin/jest.js "${jestArgs[@]}" +$node node_modules/.bin/jest "${jestArgs[@]}"