mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
* feat(server): Avoid face matching with people born after file creation date (#4743) * lint * add medium tests for facial recognition --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { PersonRepository } from 'src/repositories/person.repository';
|
|
import { RepositoryInterface } from 'src/types';
|
|
import { Mocked, vitest } from 'vitest';
|
|
|
|
export const newPersonRepositoryMock = (): Mocked<RepositoryInterface<PersonRepository>> => {
|
|
return {
|
|
reassignFaces: vitest.fn(),
|
|
unassignFaces: vitest.fn(),
|
|
delete: vitest.fn(),
|
|
deleteFaces: vitest.fn(),
|
|
getAllFaces: vitest.fn(),
|
|
getAll: vitest.fn(),
|
|
getAllForUser: vitest.fn(),
|
|
getAllWithoutFaces: vitest.fn(),
|
|
getFaces: vitest.fn(),
|
|
getFaceById: vitest.fn(),
|
|
getFaceByIdWithAssets: vitest.fn(),
|
|
reassignFace: vitest.fn(),
|
|
getById: vitest.fn(),
|
|
getByName: vitest.fn(),
|
|
getDistinctNames: vitest.fn(),
|
|
getStatistics: vitest.fn(),
|
|
getNumberOfPeople: vitest.fn(),
|
|
create: vitest.fn(),
|
|
createAll: vitest.fn(),
|
|
refreshFaces: vitest.fn(),
|
|
update: vitest.fn(),
|
|
updateAll: vitest.fn(),
|
|
getFacesByIds: vitest.fn(),
|
|
getRandomFace: vitest.fn(),
|
|
getLatestFaceDate: vitest.fn(),
|
|
createAssetFace: vitest.fn(),
|
|
deleteAssetFace: vitest.fn(),
|
|
softDeleteAssetFaces: vitest.fn(),
|
|
};
|
|
};
|