Add adversarial test suite
This commit is contained in:
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -u
|
||||
|
||||
echo "========================================"
|
||||
echo "Universal Cookie Consent — Test Suite"
|
||||
echo "========================================"
|
||||
echo
|
||||
|
||||
run_test() {
|
||||
local name="$1"
|
||||
local command="$2"
|
||||
|
||||
echo "----------------------------------------"
|
||||
echo "$name"
|
||||
echo "----------------------------------------"
|
||||
|
||||
if eval "$command"; then
|
||||
echo
|
||||
echo "PASS: $name"
|
||||
echo
|
||||
else
|
||||
echo
|
||||
echo "FAIL: $name"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
run_test "Core" \
|
||||
"node test-core.mjs"
|
||||
|
||||
run_test "Jurisdiction" \
|
||||
"node tests/jurisdiction-test.mjs"
|
||||
|
||||
run_test "Integration" \
|
||||
"node tests/integration/integration-test.mjs"
|
||||
|
||||
run_test "Audit" \
|
||||
"node tests/audit/audit-test.mjs"
|
||||
|
||||
run_test "Reliability" \
|
||||
"node tests/reliability/reliability-test.mjs"
|
||||
|
||||
run_test "Adversarial" \
|
||||
"node tests/adversarial/adversarial-test.mjs"
|
||||
|
||||
echo "========================================"
|
||||
echo "ALL TEST GROUPS PASSED"
|
||||
echo "========================================"
|
||||
Reference in New Issue
Block a user