SIGN IN SIGN UP
koala73 / worldmonitor UNCLAIMED

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

0 0 157 TypeScript

chore(hooks): scope pre-push tests to changed files (#3928)

* chore(hooks): scope pre-push tests to changed files, drop tests/ → RUN_ALL

The pre-push hook escalated to the full unit-test suite (`timeout 300 npx
tsx --test tests/*.test.mjs tests/*.test.mts`) whenever ANY tests/ file
changed. That suite has grown past the 300s ceiling — current runtime is
357s for 10072 tests (measured 2026-05-27) — so every PR that touches a
test file now fails the hook by timeout alone, mid-flight in
tests/mcp.test.mjs, with no diagnostic value.

Two changes:

1. Drop the `^tests/` trigger from RUN_ALL. RUN_ALL now fires only on
   config-impacting changes (package.json, tsconfig) where rerunning
   everything is semantically required. Test-file edits no longer
   escalate scope.

2. Add a TESTS_CHANGED capture that runs the changed `.test.mjs` /
   `.test.mts` files specifically. Editing one test runs that test, not
   the other 10k. The catch-all "skipping unit tests" branch now also
   gates on TESTS_CHANGED being empty so this new path doesn't suppress
   the existing skip message.

Full-suite verification still happens in CI on PR open. The pre-push
hook is the fast pre-flight, not the merge gate; making it actually fast
restores the intended ratio.

* chore(hooks): avoid full local unit suite in pre-push
E
Elie Habib committed
ebc1e62782a0a0cf56bb0fbdd61ffe04560d29cf
Parent: 84f50c5
Committed by GitHub <noreply@github.com> on 5/27/2026, 9:40:35 AM