vps-health-api/__tests__
le king fu d7120063ad
All checks were successful
CI / verification (pull_request) Successful in 21s
CI / verification (push) Successful in 21s
test(ci): check the load-late detector on its own (#35)
No runtime file breaks the "require at column 0" pin, so nothing
exercised its detector: on a03e4d4, bringing either regex back to its
form on main, or deleting the require or the import clause, left the 19
cases green, and the two holes this PR closes could reopen unnoticed.

The rule moves into loadsLate(line), which the pin on index.js and
metrics.js now calls, and six rows check it directly: an indented
require and a dynamic import at any column are flagged, each with and
without a space before the parenthesis; a top-level require and a
comment line quoting require are let through.

Measured on the new tree: either regex back to its main form turns 1
row red, removing the require or the import clause turns 2 rows red,
removing the column condition turns 3 red (the two real files and the
top-level row), removing the comment skip turns 1 red.

ci.test.js 19 -> 25 cases, vitest 347 -> 353.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 17:42:01 -04:00
..
agent.test.js feat(agent): push workstation metrics to /hosts/<id> from cron 2026-08-16 12:21:59 -04:00
auth.test.js test(auth): pin the single space after the Bearer scheme 2026-09-27 19:23:50 -04:00
ci.test.js test(ci): check the load-late detector on its own (#35) 2026-10-01 17:42:01 -04:00
findings.test.js feat(defenseurs): add GET /defenseurs/findings?project=X route 2026-05-12 20:56:56 -04:00
health.test.js refactor: extract CPU/RAM/disk collection into metrics.js 2026-08-16 11:30:03 -04:00
hosts.test.js fix(hosts): require 3 loadAvg values and sweep orphan temp files (#25) 2026-09-29 20:30:07 -04:00
state.test.js feat(defenseurs): serve the Sergent's findings state at GET /defenseurs/state 2026-09-24 20:42:20 -04:00
writes.test.js test: cover degraded paths and shell commands in the write guard (#36) 2026-09-30 19:59:44 -04:00