veza/tmt/tests/frontend/unit.sh

20 lines
335 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)"
cd "$WEB_DIR"
if [ ! -d "node_modules" ]; then
echo "Installing dependencies..."
npm ci
fi
echo "Running unit tests with coverage..."
npm run test -- --run --coverage
echo "Unit tests passed."