test: add P1 manual configuration walkthrough

This commit is contained in:
2026-08-09 21:12:08 +02:00
parent d27be56d5c
commit 74ddb86d13
7 changed files with 460 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
if [[ $# -ne 1 || ! "$1" =~ ^(prepare|serve|stop|cleanup)$ ]]; then
printf 'usage: %s prepare|serve|stop|cleanup
' "$0" >&2
exit 2
fi
if [[ "$1" == prepare ]]; then
for command in node npm git curl unzip zipinfo lsof; do
command -v "$command" >/dev/null || { printf 'missing prerequisite: %s
' "$command" >&2; exit 127; }
done
for path in scripts/p1-acceptance.sh scripts/test-p1-acceptance.sh backend/scripts/p1-acceptance.mjs; do
[[ -f "$repo_root/$path" ]] || { printf 'Task 8 prerequisite missing: %s
' "$path" >&2; exit 1; }
done
npm --prefix "$repo_root/backend" run build
fi
exec node "$repo_root/backend/scripts/p1-manual-acceptance.mjs" "$1"
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
npm --prefix "$repo_root/backend" run build
node --test "$repo_root/backend/scripts/p1-manual-acceptance.test.mjs" "$repo_root/backend/scripts/p1-render-snapshot.test.mjs"