diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..07a9522 --- /dev/null +++ b/.npmignore @@ -0,0 +1,18 @@ +# Things the published package doesn't need to run the tests or show their results. Everything +# else ships; note that having this file means .gitignore is no longer consulted. + +# the annotated spec's build inputs (the built page and its assets ship) +/spec/Makefile +/spec/*.xml +/spec/lib/ + +# the Docker image's build files; test-docker.sh pulls the image instead +/docker/ + +# repository tooling +/.editorconfig +/.github/ +/CNAME + +# local state +/server.pid diff --git a/README.md b/README.md index ec67fb0..016b730 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Therefore, if you believe a test should change (based upon common behaviour or y ## Installation -The tests require a recent version of [NodeJS](https://nodejs.org/) (14.8.0 or greater), which includes the `npm` package manager. +The tests require a recent version of [NodeJS](https://nodejs.org/) (22.19.0 or greater), which includes the `npm` package manager. To install the most recent source from GitHub (*recommended; things are moving fast*): @@ -54,7 +54,7 @@ Alternatively, for the most recent release: > npm i --legacy-bundling http-cache-tests -Note that the version in the registry is not necessarily up-to-date. +Note that the version in the registry is not necessarily up-to-date. The package has what you need to run the server, the command-line client, the browser tests and the scripts below, and to view results locally (`index.html`, the `results` directory and the annotated specification), but not the Docker image's build files or the specification's sources; the scripts that save results create a `results` directory if there isn't one. ## Running tests with scripts diff --git a/package.json b/package.json index adf9fbd..e3d4632 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "author": "Mark Nottingham", "license": "BSD-3-Clause", "engines": { - "node": ">=14.8.0" + "node": ">=22.19.0" }, "dependencies": { "liquidjs": "^10.9.2", diff --git a/test-browser.sh b/test-browser.sh index 019ad4b..3df01e1 100755 --- a/test-browser.sh +++ b/test-browser.sh @@ -77,6 +77,7 @@ function test_browser { sleep 1 if [ -f "${TARGET}" ] ; then + mkdir -p results mv "${TARGET}" results/ fi diff --git a/test-docker.sh b/test-docker.sh index c4cd386..29ca69d 100755 --- a/test-docker.sh +++ b/test-docker.sh @@ -87,6 +87,7 @@ function test_proxy { echo "* ${PKG} $(docker container exec tmp_proxies /usr/bin/apt-cache show ${PKG} | grep Version)" if [[ -z "${TEST_ID}" ]]; then + mkdir -p results npm run --silent cli --base=http://localhost:${PROXY_PORT} > "results/${PROXY}.json" else npm run --silent cli --base=http://localhost:${PROXY_PORT} --id="${TEST_ID}"