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