Files
bortstack-forge/templates/flask-react/boilerplate/.bortstack/testing/run-unit-tests.sh
T
2026-12-02 15:44:24 +00:00

10 lines
382 B
Bash
Executable File

#!/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)