toolmark-monorepo / @toolmark/testing/page / installTestHook
Function: installTestHook()
installTestHook(
tm): () =>void
Defined in: packages/testing/src/page/install-test-hook.ts:58
Installs the test hook at globalThis.__toolmark_test__ for tm. Test builds only: apps call this behind a non-production check (see Task 15's pattern). It accepts every caller except human, which throws (or rejects, from call) a TypeError with message "caller human is not allowed through the test hook".
Parameters
tm
The registry to expose.
Returns
Removes the hook (idempotent; a no-op if another installTestHook call replaced it).
() => void