mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 18:42:17 -07:00
192e950567
* fix: timezone bucket timezones * chore: open api * fix: interpret local time in utc * fix: tests * fix: refactor memory lane * fix(web): use local date in memory viewer * chore: set localDateTime non-null * fix: filter out memories from the current year * wip: move localDateTime to asset * fix: correct sorting from db * fix: migration * fix: web typo * fix: formatting * fix: e2e * chore: localDateTime is non-null * chore: more non-nulliness * fix: asset stub * fix: tests * fix: use extract and index for day of year * fix: don't show memories before today * fix: cleanup * fix: tests * fix: only use localtime for tz * fix: display memories in client timezone * fix: tests * fix: svelte tests * fix: bugs * chore: open api --------- Co-authored-by: Jonathan Jogenfors <jonathan@jogenfors.se>
33 lines
980 B
TypeScript
33 lines
980 B
TypeScript
import { IAssetRepository } from '@app/domain';
|
|
|
|
export const newAssetRepositoryMock = (): jest.Mocked<IAssetRepository> => {
|
|
return {
|
|
create: jest.fn(),
|
|
upsertExif: jest.fn(),
|
|
getByDate: jest.fn(),
|
|
getByDayOfYear: jest.fn(),
|
|
getByIds: jest.fn().mockResolvedValue([]),
|
|
getByAlbumId: jest.fn(),
|
|
getByUserId: 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 }),
|
|
updateAll: jest.fn(),
|
|
getByLibraryId: jest.fn(),
|
|
getById: jest.fn(),
|
|
getByLibraryIdAndOriginalPath: jest.fn(),
|
|
deleteAll: jest.fn(),
|
|
save: jest.fn(),
|
|
findLivePhotoMatch: jest.fn(),
|
|
getMapMarkers: jest.fn(),
|
|
getStatistics: jest.fn(),
|
|
getByTimeBucket: jest.fn(),
|
|
getTimeBuckets: jest.fn(),
|
|
remove: jest.fn(),
|
|
};
|
|
};
|