veza/tmt/tests/frontend/unit.sh
senke 8a0f008345 chore: playwright workflow, docs, rapports audit, visual-tests, tmt unit
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 22:19:34 +01:00

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."