test-workers.sh (385B)
1 #!/bin/bash 2 set -euo pipefail 3 4 # Runs the Cloudflare Worker unit tests with Node's built-in test runner (no 5 # dependencies to install). The tests import the worker modules directly and 6 # stub the Durable Object storage surface, so they cover the workers' pure 7 # logic — not the Cloudflare runtime itself. 8 cd "$(dirname "${BASH_SOURCE[0]}")/.." 9 node --test "Tests/Workers/*.test.mjs"