1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00
immich/server/test/repositories/storage.repository.mock.ts

17 lines
459 B
TypeScript
Raw Normal View History

import { IStorageRepository } from '@app/domain';
export const newStorageRepositoryMock = (): jest.Mocked<IStorageRepository> => {
return {
createZipStream: jest.fn(),
createReadStream: jest.fn(),
unlink: jest.fn(),
unlinkDir: jest.fn().mockResolvedValue(true),
removeEmptyDirs: jest.fn(),
moveFile: jest.fn(),
checkFileExists: jest.fn(),
mkdirSync: jest.fn(),
2023-03-22 04:49:19 +02:00
checkDiskUsage: jest.fn(),
readdir: jest.fn(),
};
};