Adding script to run against official specs

This commit is contained in:
Tyler Akins 2021-11-25 15:40:13 -06:00
parent 3aa5c462f8
commit 08576fca7b
No known key found for this signature in database
GPG Key ID: 8F3B8C432F4393BD
3 changed files with 22 additions and 10 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@ tests/*.diff
spec/ spec/
spec-runner/ spec-runner/
node_modules/ node_modules/
package.json
package-lock.json

View File

@ -1,10 +0,0 @@
{
"dependencies": {
"async": "*"
},
"scripts": {
"clean": "rm -rf package-lock.json node_modules/ spec/",
"install-tests": "npm install; git clone https://github.com/mustache/spec.git spec",
"test": "node run-spec.js spec/specs/*.json"
}
}

20
run-spec Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Create a package.json so the dependency package is installed in the local
# directory
echo '{"private":true, "dependencies":{"async": "*"}}' > package.json
npm install
# Install or update the specs
if [[ ! -d spec ]]; then
git clone https://github.com/mustache/spec.git spec
else
(
cd spec;
git pull
)
fi
# Actually run the specs
node run-spec.js spec/specs/*.json