MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / createTestFS

Function createTestFS

packages/filesystem/webdav/webdav.test.ts:21–25  ·  view source on GitHub ↗

创建可测试的 WebDAVFileSystem 实例(替换 client 为 mock)

(mockClient: WebDAVClient, url = "https://dav.example.com")

Source from the content-addressed store, hash-verified

19
20/** 创建可测试的 WebDAVFileSystem 实例(替换 client 为 mock) */
21function createTestFS(mockClient: WebDAVClient, url = "https://dav.example.com"): WebDAVFileSystem {
22 const fs = WebDAVFileSystem.fromCredentials(url, {});
23 fs.client = mockClient;
24 return fs;
25}
26
27describe("WebDAVFileSystem", () => {
28 let mockClient: WebDAVClient;

Callers 1

webdav.test.tsFile · 0.85

Calls 1

fromCredentialsMethod · 0.80

Tested by

no test coverage detected