File size: 679 Bytes
6a7089a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -e

# test-dashboard.sh — Run dashboard tests (matches CI: dashboard.yml)
# Runs: vitest run

cd "$(dirname "$0")/.."

BOLD=$'\033[1m'
ACCENT=$'\033[38;2;251;191;36m'
SUCCESS=$'\033[38;2;0;229;204m'
ERROR=$'\033[38;2;230;57;70m'
NC=$'\033[0m'

fail() { echo -e "  ${ERROR}${NC} $1"; exit 1; }

if [ ! -d "dashboard" ]; then
  fail "Dashboard directory not found"
fi

cd dashboard

# Use bun as in workflow
if ! command -v bun &>/dev/null; then
  fail "bun not found (required for dashboard tests)"
fi

if bun run test:run; then
  echo ""
  echo -e "  ${SUCCESS}${BOLD}Dashboard tests passed!${NC}"
  echo ""
else
  echo ""
  fail "Dashboard tests failed"
fi