Add some assertions to the test
- ID
5287b6a- date
2024-06-19 21:59:50+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
b925c56- message
Add some assertions to the test- changed files
1 file, 12 additions
Changed files
.github/workflows/test.yml (386) → .github/workflows/test.yml (812)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index feb5f3c..2b45792 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,7 +16,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
+
+ # This is a crude test harness that checks the script is working correctly: it
+ # runs the script, and checks the generated files are created as expected.
- name: Run tests
run: |
node measure https://wellcomecollection.org/collections collections
+
+ ls out
+ if [ ! -f "out/collections.html" ]; then exit 1; fi
+ if [ ! -f "out/collections.json" ]; then exit 1; fi
+
node measure https://wellcomecollection.org/collections
+
+ ls out
+ if [ ! -f "out/export.html" ]; then exit 1; fi
+ if [ ! -f "out/export.json" ]; then exit 1; fi