veza/tmt/tests/frontend/unit.sh

23 lines
404 B
Bash
Raw Normal View History

#!/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."