MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / createQueue

Function createQueue

cli/src/commands/fileSystem/transferQueue.test.ts:389–394  ·  view source on GitHub ↗
(sdk: Pick<ProtonDriveClient, 'iterateFolderChildren'>)

Source from the content-addressed store, hash-verified

387 expect(readdirMock).toHaveBeenCalledWith(resolvedParent, { withFileTypes: true });
388 expect(q['queue']).toHaveLength(1);
389 expect(q['queue'][0]).toMatchObject({ kind: 'file', baseName: 'kid' });
390 });
391
392 it('enqueueLocalDirectoryChildren rejects children on another device (mount point)', async () => {
393 const kid = { name: 'mounted', isDirectory: () => true, isFile: () => false } as Dirent;
394 lstatMock.mockResolvedValueOnce(mockDirLstatResult(1));
395 readdirMock.mockResolvedValueOnce([kid] as unknown as ReaddirDirents);
396 lstatMock.mockResolvedValueOnce(mockDirLstatResult(2));
397 const q = new UploadQueue(getMockLogger(), testSummary(), {

Callers 1

Calls 2

getMockLoggerFunction · 0.90
testSummaryFunction · 0.85

Tested by

no test coverage detected