mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 10:56:47 +01:00
ec4eb7cd19
* feat: dedupe by checksum header * chore: open api
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { IAssetRepository } from 'src/interfaces/asset.interface';
|
|
import { Mocked, vitest } from 'vitest';
|
|
|
|
export const newAssetRepositoryMock = (): Mocked<IAssetRepository> => {
|
|
return {
|
|
create: vitest.fn(),
|
|
upsertExif: vitest.fn(),
|
|
upsertJobStatus: vitest.fn(),
|
|
getByDayOfYear: vitest.fn(),
|
|
getByIds: vitest.fn().mockResolvedValue([]),
|
|
getByIdsWithAllRelations: vitest.fn().mockResolvedValue([]),
|
|
getByAlbumId: vitest.fn(),
|
|
getByUserId: vitest.fn(),
|
|
getById: vitest.fn(),
|
|
getWithout: vitest.fn(),
|
|
getByChecksum: vitest.fn(),
|
|
getUploadAssetIdByChecksum: vitest.fn(),
|
|
getWith: vitest.fn(),
|
|
getRandom: vitest.fn(),
|
|
getFirstAssetForAlbumId: vitest.fn(),
|
|
getLastUpdatedAssetForAlbumId: vitest.fn(),
|
|
getAll: vitest.fn().mockResolvedValue({ items: [], hasNextPage: false }),
|
|
getAllByDeviceId: vitest.fn(),
|
|
updateAll: vitest.fn(),
|
|
getExternalLibraryAssetPaths: vitest.fn(),
|
|
getByLibraryIdAndOriginalPath: vitest.fn(),
|
|
deleteAll: vitest.fn(),
|
|
update: vitest.fn(),
|
|
remove: vitest.fn(),
|
|
findLivePhotoMatch: vitest.fn(),
|
|
getMapMarkers: vitest.fn(),
|
|
getStatistics: vitest.fn(),
|
|
getTimeBucket: vitest.fn(),
|
|
getTimeBuckets: vitest.fn(),
|
|
restoreAll: vitest.fn(),
|
|
softDeleteAll: vitest.fn(),
|
|
getAssetIdByCity: vitest.fn(),
|
|
getAssetIdByTag: vitest.fn(),
|
|
getAllForUserFullSync: vitest.fn(),
|
|
getChangedDeltaSync: vitest.fn(),
|
|
};
|
|
};
|