immich/server/libs/domain/test/storage.repository.mock.ts

15 lines
398 B
TypeScript
Raw Normal View History

import { IStorageRepository } from '../src';
export const newStorageRepositoryMock = (): jest.Mocked<IStorageRepository> => {
return {
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(),
};
};