/**
 * `mock.module()` that automatically restores the real module once the current
 * test file finishes.
 *
 * bun's `mock.module()` mutates the live module namespace in place and the
 * override persists for the entire test process — it is not undone by
 * `mock.restore()` and it leaks into every test file that runs afterwards. When
 * the whole suite runs in a single `bun test` process that makes the result
 * order-dependent: a module mocked by one file is still mocked when an unrelated
 * file imports the real thing.
 *
 * Pass the statically-imported real module namespace as `realModule` so a
 * shallow snapshot is captured before the mock is installed; an `afterAll` then
 * reinstates that snapshot, keeping each test file hermetic.
 *
 * Relative specifiers (`./` or `../`) are resolved against the *caller's*
 * directory before being handed to `mock.module()`. bun resolves a relative
 * specifier relative to the file that invokes `mock.module()`, which here is
 * this helper rather than the test file — so a bare relative string would
 * register the override under the wrong path and silently do nothing. Resolving
 * to an absolute path up front keys the override correctly regardless of where
 * the helper lives.
 *
 * Usage:
 *   import * as agentRoot from '../utils/agent-root.js'
 *   mockModule('../utils/agent-root.js', agentRoot, () => ({ findAgentRootOrFail: mockFn }))
 */
export declare function mockModule(specifier: string, realModule: Record<string, unknown>, factory: () => Record<string, unknown>): void;
//# sourceMappingURL=mock-module.d.ts.map