From 86cc3f77ee9de5fdfbd8e1fceb343f81e3d5cf3a Mon Sep 17 00:00:00 2001 From: Amir Omidi Date: Thu, 24 Oct 2019 15:32:43 -0700 Subject: [PATCH] Fixes some code coverage issues (#7994) * Fix code coverage issues * Fix some code coverage stuff --- package.json | 2 +- scripts/test.sh | 12 ++++++------ yarn.lock | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index fc87548c43..0794f4a873 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "minimatch": "^3.0.4", "mkdirp": "^0.5.0", "mocha": "^2.2.5", - "mocha-junit-reporter": "^1.17.0", + "mocha-junit-reporter": "^1.23.1", "opn": "^6.0.0", "optimist": "0.3.5", "p-all": "^1.0.0", diff --git a/scripts/test.sh b/scripts/test.sh index ff5a943cfc..837534f465 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,6 +1,6 @@ #!/bin/bash - +PASSED_ARGS="$@" if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } ROOT=$(dirname $(dirname $(realpath "$0"))) @@ -21,14 +21,14 @@ fi # Default to only running stable tests if test grep isn't set if [[ "$ADS_TEST_GREP" == "" ]]; then echo Running stable tests only - export ADS_TEST_GREP=@UNSTABLE@ + export ADS_TEST_GREP="@UNSTABLE@" export ADS_TEST_INVERT_GREP=1 fi -CODE_ARGS=--grep %ADS_TEST_GREP% +CODE_ARGS="--grep $ADS_TEST_GREP" if [[ "$ADS_TEST_INVERT_GREP" == "1" ]] || [[ "$ADS_TEST_INVERT_GREP" == "true" ]]; then - set CODE_ARGS=$CODE_ARGS --invert + CODE_ARGS="$CODE_ARGS --invert" fi # Node modules @@ -42,10 +42,10 @@ if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \ ELECTRON_ENABLE_LOGGING=1 \ "$CODE" \ - test/electron/index.js $CODE_ARGS "$@" + test/electron/index.js $CODE_ARGS $PASSED_ARGS else cd $ROOT ; \ ELECTRON_ENABLE_LOGGING=1 \ "$CODE" \ - test/electron/index.js --no-sandbox "$@" # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox. + test/electron/index.js --no-sandbox $PASSED_ARGS # Electron 6 introduces a chrome-sandbox that requires root to run. This can fail. Disable sandbox via --no-sandbox. fi diff --git a/yarn.lock b/yarn.lock index 823525a352..ac0b8dacb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5693,10 +5693,10 @@ mksnapshot@^0.3.0: fs-extra "0.26.7" request "^2.79.0" -mocha-junit-reporter@^1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.17.0.tgz#2e5149ed40fc5d2e3ca71e42db5ab1fec9c6d85c" - integrity sha1-LlFJ7UD8XS48px5C21qx/snG2Fw= +mocha-junit-reporter@^1.23.1: + version "1.23.1" + resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.23.1.tgz#ba11519c0b967f404e4123dd69bc4ba022ab0f12" + integrity sha512-qeDvKlZyAH2YJE1vhryvjUQ06t2hcnwwu4k5Ddwn0GQINhgEYFhlGM0DwYCVUHq5cuo32qAW6HDsTHt7zz99Ng== dependencies: debug "^2.2.0" md5 "^2.1.0"