22 lines
404 B
Bash
Executable file
22 lines
404 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
WEB_DIR="$REPO_ROOT/apps/web"
|
|
|
|
echo "📍 Frontend Unit Tests (Vitest)"
|
|
echo "📂 Web Directory: $WEB_DIR"
|
|
|
|
cd "$WEB_DIR"
|
|
|
|
if [ ! -d "node_modules" ]; then
|
|
echo "📦 Installing dependencies..."
|
|
npm ci
|
|
else
|
|
echo "✅ Dependencies found"
|
|
fi
|
|
|
|
echo "🧪 Running unit tests..."
|
|
npm run test -- --run
|
|
|
|
echo "✅ Unit tests passed."
|