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