immich/server/test/repositories/storage.repository.mock.ts

16 lines
435 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-21 19:49:19 -07:00
checkDiskUsage: jest.fn(),
};
};