immich/server/libs/domain/test/storage.repository.mock.ts
Jason Rasmussen 1c2d83e2c7
refactor(server): job handlers (#2572)
* refactor(server): job handlers

* chore: remove comment

* chore: add comments for
2023-05-26 14:43:24 -05:00

15 lines
398 B
TypeScript

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(),
checkDiskUsage: jest.fn(),
};
};