Skip to content

Commit

Permalink
Add some fixes to properly set multi variable
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Dec 3, 2024
1 parent 8890135 commit 6b99575
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .circleci/setupAndTestBackendSDKWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ export TEST_MODE=testing
export SUPERTOKENS_CORE_TAG=$coreTag
export NODE_PORT=8081
export INSTALL_PATH=../supertokens-root
export multi="spec=- mocha-junit-reporter=/dev/null"

TEST_FILES=$(circleci tests glob "test/**/*.test.js")
multi="spec=- mocha-junit-reporter=/dev/null" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --node-option no-experimental-fetch -r test/fetch-polyfill.mjs --timeout 500000 --no-config" --verbose --split-by=timings
echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --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)
7 changes: 6 additions & 1 deletion .circleci/setupAndTestWithAuthReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +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"

export multi="spec=- mocha-junit-reporter=/dev/null"
export TEST_MODE=testing
export APP_SERVER=$apiPort
export SCREENSHOT_ROOT=~/test_report/screenshots

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
echo $SPEC_FILES | 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

testPassed=$?;
cp ../supertokens-root/logs/error.log ~/test_report/logs/core_error.log
Expand Down
3 changes: 2 additions & 1 deletion .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export TEST_MODE=testing
export SUPERTOKENS_CORE_TAG=$coreTag
export NODE_PORT=8081
export INSTALL_PATH=../supertokens-root
export multi="spec=- mocha-junit-reporter=/dev/null"

TEST_FILES=$(circleci tests glob "test/**/*.test.js")
multi="spec=- mocha-junit-reporter=/dev/null" echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings
echo "$TEST_FILES" | circleci tests run --command="xargs npx mocha mocha --reporter mocha-multi --node-option no-experimental-fetch --timeout 40000 --no-config" --verbose --split-by=timings
8 changes: 7 additions & 1 deletion .circleci/setupAndTestWithFrontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ npm i
cd ../../
npm i -d

export TEST_MODE=testing
export SUPERTOKENS_CORE_TAG=$coreTag
export NODE_PORT=8081
export INSTALL_PATH=../supertokens-root
export multi="spec=- mocha-junit-reporter=/dev/null"

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
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 6b99575

Please sign in to comment.