This repository has been archived on 2025-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
supervisor/scripts/test.sh

37 lines
983 B
Bash
Executable File

#!/bin/bash
set -e
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
PROJECT_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
echo "========================================="
echo "Testing Hero Supervisor Workspace"
echo "========================================="
# Test core and client (workspace members)
echo ""
echo "🧪 Testing core and client..."
cd "$PROJECT_DIR"
cargo test --workspace
echo ""
echo "✅ Core and client tests passed"
# Test UI (WASM target)
echo ""
echo "🧪 Testing UI (WASM)..."
cd "$PROJECT_DIR/ui"
# Check if wasm-pack is installed for WASM testing
if ! command -v wasm-pack &> /dev/null; then
echo "⚠️ Warning: wasm-pack not found. Skipping UI tests."
echo " Install wasm-pack with: cargo install wasm-pack"
else
wasm-pack test --headless --firefox
echo "✅ UI tests passed"
fi
echo ""
echo "========================================="
echo "✅ All tests completed successfully"
echo "========================================="