From 902b8a58693e167ae2edd06258eb18c55fc70a73 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Tue, 3 Dec 2024 16:47:17 +0530 Subject: [PATCH] Add some fixes to run tests more accurately in different setups --- .circleci/setupAndTestBackendSDKWithFreeCore.sh | 2 +- .circleci/setupAndTestWithFreeCore.sh | 2 +- .circleci/setupAndTestWithFrontend.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/setupAndTestBackendSDKWithFreeCore.sh b/.circleci/setupAndTestBackendSDKWithFreeCore.sh index 9dd98c99d..d485025cc 100755 --- a/.circleci/setupAndTestBackendSDKWithFreeCore.sh +++ b/.circleci/setupAndTestBackendSDKWithFreeCore.sh @@ -110,7 +110,7 @@ npm install npm run build TEST_FILES=$(circleci tests glob "test/**/*.test.js") -API_PORT=$API_PORT TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=~/test_report/junit-results.xml" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings +API_PORT=$API_PORT TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --timeout 500000 --no-config" --verbose --split-by=timings # kill test-server kill $(lsof -t -i:$API_PORT) diff --git a/.circleci/setupAndTestWithFreeCore.sh b/.circleci/setupAndTestWithFreeCore.sh index 548bbe664..be84fbcdb 100755 --- a/.circleci/setupAndTestWithFreeCore.sh +++ b/.circleci/setupAndTestWithFreeCore.sh @@ -90,4 +90,4 @@ cd ../project/ set -e TEST_FILES=$(circleci tests glob "test/**/*.test.js") -TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings +TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings diff --git a/.circleci/setupAndTestWithFrontend.sh b/.circleci/setupAndTestWithFrontend.sh index c9c6fb649..d3ab38055 100755 --- a/.circleci/setupAndTestWithFrontend.sh +++ b/.circleci/setupAndTestWithFrontend.sh @@ -98,8 +98,8 @@ npm i cd ../../ npm i -d -TEST_FILES=$(circleci tests glob "test/**/*.test.js") -TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=./junit-results.xml" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings +TEST_FILES=$(circleci tests glob "test/*.test.js") +TEST_MODE=testing SUPERTOKENS_CORE_TAG=$coreTag NODE_PORT=8081 INSTALL_PATH=../supertokens-root multi="spec=- mocha-junit-reporter=/dev/null" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha npx mocha --exit --reporter mocha-multi --no-config --require isomorphic-fetch --timeout 500000" --verbose --split-by=timings if [[ $? -ne 0 ]] then