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