#!/bin/bash # Run frontend tests only. # # `bun run test` is a single pass (`vitest run`), which is what CI and the # pre-commit hook want. This wrapper keeps the interactive modes reachable: # pass --watch or --ui and vitest is invoked in its long-running form instead. # Any other arguments (test-name filters, path filters, --reporter, ...) are # forwarded to the single-pass run. set -e echo "📦 Running frontend tests..." for arg in "$@"; do case "$arg" in --watch | --ui | -w) exec bunx vitest "$@" ;; esac done exec bunx vitest run "$@"