Node 22 fix needed: scripts/run-tests.js in ts-architecture-template

@DJJones — surfaced during a fresh setup-prompt run yesterday on the PAA mini-course. Same shape as your earlier 02d6a2f patch but in a different script.

Symptom: npm test fails on Node 22+ in a fresh template clone — the test runner reports test/unit is not a valid module path.

Cause: scripts/run-tests.js still passes test/unit and test/integration as directory paths to node --test. Node 22 deprecated the directory form and now resolves the path as a module specifier, which fails.

Fix: same one-line glob shape you used in your earlier test:conformance patch. Change

node --test test/unit
node --test test/integration

to

node --test test/unit/*.test.js
node --test test/integration/*.test.js

Verified: running with the glob form passes 40/40 unit + 1/1 integration on Node 22.20.

Context: the L2 mini-course setup prompt was just updated to call npm run check:conformance instead of npm test (sidesteps this for fresh students), but worth landing the fix for cleanliness so npm test works out of the box on any supported Node version.

PR or direct push to Personal-AI-Architecture/ts-architecture-template, your call.

Commit: 42b0f1b Fix test runner paths for Node 22

What changed:

  • scripts/run-tests.js: defaults to test/unit/*.test.js and expands glob-style targets itself, since spawnSync does not use shell glob expansion.
  • .github/workflows/ci.yml: changed the integration test step to node --test test/integration/*.test.js.

Verified:

  • npm test on Node 20: 40/40 pass
  • npm test – test/integration on Node 20: 1/1 pass
  • npx -y node@22.20.0 ./scripts/run-tests.js: 40/40 pass
  • npx -y node@22.20.0 ./scripts/run-tests.js test/integration: 1/1 pass
  • tsc --noEmit: pass
  • npm run check:conformance: pass