2024-03-21 06:59:49 -05:00
|
|
|
import { IMediaRepository } from 'src/interfaces/media.interface';
|
2024-04-16 09:44:45 -05:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2023-03-23 21:40:46 -05:00
|
|
|
|
2024-04-16 09:44:45 -05:00
|
|
|
export const newMediaRepositoryMock = (): Mocked<IMediaRepository> => {
|
2023-03-23 21:40:46 -05:00
|
|
|
return {
|
2024-04-16 09:44:45 -05:00
|
|
|
generateThumbhash: vitest.fn(),
|
2024-04-19 10:50:13 -05:00
|
|
|
extract: vitest.fn().mockResolvedValue(false),
|
2024-04-16 09:44:45 -05:00
|
|
|
resize: vitest.fn(),
|
|
|
|
crop: vitest.fn(),
|
|
|
|
probe: vitest.fn(),
|
|
|
|
transcode: vitest.fn(),
|
2024-04-19 10:50:13 -05:00
|
|
|
getImageDimensions: vitest.fn(),
|
2023-03-23 21:40:46 -05:00
|
|
|
};
|
|
|
|
};
|