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