mirror of
https://github.com/immich-app/immich.git
synced 2024-12-12 11:45:38 +02:00
e334443919
* initial pagination impl * use limit + offset instead of take + skip * wip web pagination * working infinite scroll * update api * formatting * fix rebase * search refactor * re-add runtime config for vector search * fix rebase * fixes * useless omitBy * unnecessary handling * add sql decorator for `searchAssets` * fixed search builder * fixed sql * remove mock method * linting * fixed pagination * fixed unit tests * formatting * fix e2e tests * re-flatten search builder * refactor endpoints * clean up dto * refinements * don't break everything just yet * update openapi spec & sql * update api * linting * update sql * fixes * optimize web code * fix typing * add page limit * make limit based on asset count * increase limit * simpler import
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { IAssetRepository } from '@app/domain';
|
|
|
|
export const newAssetRepositoryMock = (): jest.Mocked<IAssetRepository> => {
|
|
return {
|
|
create: jest.fn(),
|
|
upsertExif: jest.fn(),
|
|
upsertJobStatus: jest.fn(),
|
|
getByDate: jest.fn(),
|
|
getByDayOfYear: jest.fn(),
|
|
getByIds: jest.fn().mockResolvedValue([]),
|
|
getByAlbumId: jest.fn(),
|
|
getByUserId: jest.fn(),
|
|
getById: jest.fn(),
|
|
getWithout: jest.fn(),
|
|
getByChecksum: jest.fn(),
|
|
getWith: jest.fn(),
|
|
getRandom: jest.fn(),
|
|
getFirstAssetForAlbumId: jest.fn(),
|
|
getLastUpdatedAssetForAlbumId: jest.fn(),
|
|
getAll: jest.fn().mockResolvedValue({ items: [], hasNextPage: false }),
|
|
getAllByDeviceId: jest.fn(),
|
|
updateAll: jest.fn(),
|
|
getByLibraryId: jest.fn(),
|
|
getByLibraryIdAndOriginalPath: jest.fn(),
|
|
deleteAll: jest.fn(),
|
|
save: jest.fn(),
|
|
remove: jest.fn(),
|
|
findLivePhotoMatch: jest.fn(),
|
|
getMapMarkers: jest.fn(),
|
|
getStatistics: jest.fn(),
|
|
getTimeBucket: jest.fn(),
|
|
getTimeBuckets: jest.fn(),
|
|
restoreAll: jest.fn(),
|
|
softDeleteAll: jest.fn(),
|
|
getAssetIdByCity: jest.fn(),
|
|
getAssetIdByTag: jest.fn(),
|
|
searchMetadata: jest.fn(),
|
|
};
|
|
};
|