1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-04 02:46:47 +01:00
immich/server/test/repositories/person.repository.mock.ts
Mert 8193416230
feat(server): conditionally run facial recognition nightly (#11080)
* only run nightly if new person

* add tests

* use string instead of date

* update sql

* update tests

* simplify condition
2024-07-14 22:53:42 +00:00

34 lines
908 B
TypeScript

import { IPersonRepository } from 'src/interfaces/person.interface';
import { Mocked, vitest } from 'vitest';
export const newPersonRepositoryMock = (): Mocked<IPersonRepository> => {
return {
getById: vitest.fn(),
getAll: vitest.fn(),
getAllForUser: vitest.fn(),
getAssets: vitest.fn(),
getAllWithoutFaces: vitest.fn(),
getByName: vitest.fn(),
create: vitest.fn(),
update: vitest.fn(),
deleteAll: vitest.fn(),
delete: vitest.fn(),
deleteAllFaces: vitest.fn(),
getStatistics: vitest.fn(),
getAllFaces: vitest.fn(),
getFacesByIds: vitest.fn(),
getRandomFace: vitest.fn(),
reassignFaces: vitest.fn(),
createFaces: vitest.fn(),
getFaces: vitest.fn(),
reassignFace: vitest.fn(),
getFaceById: vitest.fn(),
getFaceByIdWithAssets: vitest.fn(),
getNumberOfPeople: vitest.fn(),
getLatestFaceDate: vitest.fn(),
};
};