carlos / todomvc-bakeoff Public

Clone
git clone https://amadan.net/carlos/todomvc-bakeoff

Plain git — no account needed to clone.

Download

Download this file

1#!/usr/bin/env bash
2# Runs the shared behaviour suite against one app, with JavaScript on and off.
3# Usage: scripts/test-app.sh <base-url> [results.json]
4set -euo pipefail
5[ $# -ge 1 ] || { echo "usage: $0 <base-url> [results.json]" >&2; exit 2; }
6here=$(cd "$(dirname "$0")/../tests/behaviour" && pwd)
7results=${2:-}
8[ -z "$results" ] || results=$(cd "$(dirname "$results")" && pwd)/$(basename "$results")
9cd "$here"
10if [ ! -d node_modules/@playwright/test ]; then
11 npm ci --cache "${TMPDIR:-/tmp}/npm-cache" --no-audit --no-fund >/dev/null
12fi
13BASE_URL="$1" RESULTS_FILE="$results" exec npx playwright test --project js-on --project js-off
14