19 lines
362 B
Bash
Executable File
19 lines
362 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Frontend unit tests (Vitest + Testing Library)
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
WEB="${ROOT}/web"
|
|
|
|
cd "${WEB}"
|
|
|
|
if [[ ! -d node_modules ]]; then
|
|
echo "==> [frontend] installing dependencies"
|
|
npm ci 2>/dev/null || npm install
|
|
fi
|
|
|
|
echo "==> [frontend] vitest run"
|
|
npm run test
|
|
|
|
echo "✓ frontend tests passed"
|