test: walls r1 review — tests and tools

Ref #52
This commit is contained in:
2026-11-20 08:59:24 +01:00
parent e1a5b297e4
commit 38941da003
14 changed files with 329 additions and 69 deletions
+6
View File
@@ -12,6 +12,12 @@ export const sleep = ms => new Promise(r => setTimeout(r, ms))
export const projectRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)))
// Wall helpers shared by the harnesses (the leak driver's scenario coverage and any test that reads
// GM wall frames). The leak checker keeps its own copies on purpose: the oracle must be independent
// of the harness, not share code with it.
export const isWindow = w => w.blocks_sight === false && w.blocks_movement === true
export const anchorOf = w => [Math.round((w.a[0] + w.b[0]) / 2), Math.round((w.a[1] + w.b[1]) / 2)]
export const baseUrl = port => `http://127.0.0.1:${port}`
// Ports of a live dev session: never let a test stack touch them (prototype withserver.sh rule).