diff --git a/.circleci/setupAndTestWithAuthReact.sh b/.circleci/setupAndTestWithAuthReact.sh index 7b24796d2..2514c8aee 100755 --- a/.circleci/setupAndTestWithAuthReact.sh +++ b/.circleci/setupAndTestWithAuthReact.sh @@ -159,17 +159,13 @@ done sleep 2 # Because the server is responding does not mean the app is ready. Let's wait another 2secs to make sure the app is up. echo "Start mocha testing" -if ! [[ -z "${CI}" ]]; then - export SPEC_FILES=$(circleci tests glob 'test/end-to-end/**/*.test.js' 'test/unit/**/*.test.js') - echo "Selected spec files: $SPEC_FILES, $CIRCLE_NODE_TOTAL/$CIRCLE_NODE_INDEX" -fi +export SPEC_FILES=$(circleci tests glob 'test/end-to-end/**/*.test.js' 'test/unit/**/*.test.js') +echo $SPEC_FILES | SCREENSHOT_ROOT=~/test_report/screenshots APP_SERVER=$apiPort TEST_MODE=testing multi="spec=- mocha-junit-reporter=/dev/null" circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config" --verbose --split-by=timings -SCREENSHOT_ROOT=~/test_report/screenshots APP_SERVER=$apiPort TEST_MODE=testing mocha --bail=$BAIL --require @babel/register --require test/test.mocha.env --timeout 40000 --no-config $SPEC_FILES testPassed=$?; -if ! [[ -z "${CI}" ]]; then - cp ../supertokens-root/logs/error.log ~/test_report/logs/core_error.log - cp ../supertokens-root/logs/info.log ~/test_report/logs/core_info.log -fi +cp ../supertokens-root/logs/error.log ~/test_report/logs/core_error.log +cp ../supertokens-root/logs/info.log ~/test_report/logs/core_info.log + echo "testPassed exit code: $testPassed" killServers