MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / createMockWritable

Function createMockWritable

src/app/repo/agent_chat.test.ts:6–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4// Mock OPFS 文件系统
5function createMockOPFS() {
6 function createMockWritable() {
7 let data: any = null;
8 return {
9 write: vi.fn(async (content: any) => {
10 data = content;
11 }),
12 close: vi.fn(async () => {}),
13 getData: () => data,
14 };
15 }
16
17 function createMockFileHandle(name: string, dir: Map<string, any>) {
18 return {

Callers 1

createMockFileHandleFunction · 0.70

Calls 1

fnMethod · 0.80

Tested by

no test coverage detected