Skip to content

Commit

Permalink
Add some fixes to run tests more accurately in different setups
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Dec 3, 2024
1 parent 0ae1349 commit 902b8a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .circleci/setupAndTestWithFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 902b8a5

Please sign in to comment.