-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-tests.sh
More file actions
executable file
·38 lines (32 loc) · 955 Bytes
/
run-tests.sh
File metadata and controls
executable file
·38 lines (32 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# Automated Test Runner Wrapper
# Supports both Python and Node.js test runners
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "=========================================="
echo " Weather Dashboard Test Suite"
echo "=========================================="
echo ""
# Try Python first (most universally available)
if command -v python3 &> /dev/null; then
echo "Running tests with Python..."
echo ""
python3 run_tests.py
exit_code=$?
elif command -v python &> /dev/null; then
echo "Running tests with Python..."
echo ""
python run_tests.py
exit_code=$?
# Fall back to Node.js if available
elif command -v node &> /dev/null; then
echo "Running tests with Node.js..."
echo ""
node run-tests.js
exit_code=$?
else
echo "ERROR: Neither Python 3 nor Node.js found."
echo "Please install Python 3 or Node.js to run tests."
exit 1
fi
exit $exit_code