MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / injectReadFileSync

Function injectReadFileSync

__tests__/git-index-currency.test.ts:29–30  ·  view source on GitHub ↗
(impl: (real: typeof fs.readFileSync, ...args: any[]) => unknown)

Source from the content-addressed store, hash-verified

27const injectExecFileSync = (impl: (real: typeof cp.execFileSync, ...args: any[]) => unknown) =>
28 vi.mocked(cp.execFileSync).mockImplementation(((...args: any[]) => impl(actualCp.execFileSync, ...args)) as typeof cp.execFileSync);
29const injectReadFileSync = (impl: (real: typeof fs.readFileSync, ...args: any[]) => unknown) =>
30 vi.mocked(fs.readFileSync).mockImplementation(((...args: any[]) => impl(actualFs.readFileSync, ...args)) as typeof fs.readFileSync);
31const injectOpenSync = (impl: (real: typeof fs.openSync, ...args: any[]) => unknown) =>
32 vi.mocked(fs.openSync).mockImplementation(((...args: any[]) => impl(actualFs.openSync, ...args)) as typeof fs.openSync);
33const reinstateIo = () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected