MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / installFsMocks

Function installFsMocks

packages/cli/src/browser/manager.test.ts:56–71  ·  view source on GitHub ↗
({ existing, dirs }: FsMockOptions)

Source from the content-addressed store, hash-verified

54}
55
56function installFsMocks({ existing, dirs }: FsMockOptions) {
57 vi.doMock("node:fs", () => ({
58 existsSync: (p: string) => existing.has(p),
59 readdirSync: (p: string) => {
60 const entries = dirs?.[p];
61 if (!entries) throw new Error(`ENOENT: readdirSync mock had no entry for ${p}`);
62 return entries;
63 },
64 rmSync: () => {},
65 }));
66 vi.doMock("node:os", () => ({
67 homedir: () => FAKE_HOME,
68 platform: () => "linux",
69 arch: () => "x64",
70 }));
71}
72
73function installPuppeteerBrowsersMock(
74 opts: {

Callers 1

manager.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected