@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user