#!/usr/bin/env bash # Bama test runner — the self-contained suites only (no Mongo, no build). # The board + e2e suites need a scratch Mongo and a built app: # MONGODB_URI=mongodb://127.0.0.1:27099/bama node tests/board-test.mjs # node tests/e2e-run.mjs set -u cd "$(dirname "$0")/.." fail=0 for t in tests/date-test.mjs tests/category-test.mjs tests/relevance-test.mjs tests/text-test.mjs; do name=$(basename "$t") out=$(timeout 120 node "$t" 2>&1) code=$? if [ $code -eq 0 ]; then printf 'PASS %s\n' "$name"; else printf 'FAIL %s (exit %s)\n%s\n' "$name" "$code" "$out"; fail=1; fi done [ $fail -eq 0 ] && echo "ALL SUITES PASS" || echo "SOME SUITES FAILED" exit $fail