Skip to content

Commit e69e771

Browse files
committed
Fix run_test.sh
1 parent 31f11c5 commit e69e771

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Platforms/emscripten/browser_test/run_test.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
set -euo pipefail
33
cd "$(dirname "$0")"
44
rm -f test_log.txt
5-
echo "Installing node packages" | tee test_log.txt
5+
echo "Installing node packages" | tee -a test_log.txt
66
npm ci >> test_log.txt 2>&1
7-
echo "Installing playwright browsers" | tee test_log.txt
7+
echo "Installing playwright browsers" | tee -a test_log.txt
88
npx playwright install 2>> test_log.txt
9-
export PORT=$(npx get-port-cli)
10-
echo "Running tests with webserver on port $PORT" | tee test_log.txt
11-
CI=1 npx playwright test | tee test_log.txt
9+
# Disable color so FORCE_COLOR=1 (set in CI) doesn't wrap the port number in
10+
# ANSI escape codes, which would produce an invalid baseURL in Playwright.
11+
export PORT=$(FORCE_COLOR=0 npx get-port-cli)
12+
echo "Running tests with webserver on port $PORT" | tee -a test_log.txt
13+
CI=1 npx playwright test | tee -a test_log.txt

0 commit comments

Comments
 (0)