2023-06-08 08:01:07 -07:00
|
|
|
import { IStorageRepository } from '@app/domain';
|
2023-02-03 08:16:25 -07:00
|
|
|
|
|
|
|
export const newStorageRepositoryMock = (): jest.Mocked<IStorageRepository> => {
|
|
|
|
return {
|
2023-06-30 09:24:28 -07:00
|
|
|
createZipStream: jest.fn(),
|
2023-02-03 08:16:25 -07:00
|
|
|
createReadStream: jest.fn(),
|
2023-02-25 07:12:03 -07:00
|
|
|
unlink: jest.fn(),
|
2023-05-26 12:43:24 -07:00
|
|
|
unlinkDir: jest.fn().mockResolvedValue(true),
|
2023-02-25 07:12:03 -07:00
|
|
|
removeEmptyDirs: jest.fn(),
|
|
|
|
moveFile: jest.fn(),
|
|
|
|
checkFileExists: jest.fn(),
|
|
|
|
mkdirSync: jest.fn(),
|
2023-03-21 19:49:19 -07:00
|
|
|
checkDiskUsage: jest.fn(),
|
2023-02-03 08:16:25 -07:00
|
|
|
};
|
|
|
|
};
|