#!/bin/sh set -eu root=$(CDPATH= cd -- "$(dirname -- "$0")/../../.." && pwd) if [ ! -x "$root/api/.venv/bin/python" ] || [ ! -d "$root/react/node_modules" ]; then echo 'unit tests unavailable: install api/.venv and react/node_modules first' >&2 exit 3 fi (cd "$root/api" && APP_ENV=testing .venv/bin/python -m pytest -c pytest.ini tests) (cd "$root/react" && npm test -- --run)