2024-03-21 12:59:49 +01:00
|
|
|
import { IPersonRepository } from 'src/interfaces/person.interface';
|
2024-04-16 16:44:45 +02:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2023-05-17 19:07:17 +02:00
|
|
|
|
2024-04-16 16:44:45 +02:00
|
|
|
export const newPersonRepositoryMock = (): Mocked<IPersonRepository> => {
|
2023-05-17 19:07:17 +02:00
|
|
|
return {
|
2024-04-16 16:44:45 +02:00
|
|
|
getById: vitest.fn(),
|
|
|
|
getAll: vitest.fn(),
|
|
|
|
getAllForUser: vitest.fn(),
|
|
|
|
getAllWithoutFaces: vitest.fn(),
|
2023-05-17 19:07:17 +02:00
|
|
|
|
2024-04-16 16:44:45 +02:00
|
|
|
getByName: vitest.fn(),
|
2024-09-05 00:23:58 +02:00
|
|
|
getDistinctNames: vitest.fn(),
|
2023-10-10 16:34:25 +02:00
|
|
|
|
2024-04-16 16:44:45 +02:00
|
|
|
create: vitest.fn(),
|
2024-09-10 15:48:29 +02:00
|
|
|
createAll: vitest.fn(),
|
2024-04-16 16:44:45 +02:00
|
|
|
update: vitest.fn(),
|
2024-09-10 15:48:29 +02:00
|
|
|
updateAll: vitest.fn(),
|
2024-04-16 16:44:45 +02:00
|
|
|
delete: vitest.fn(),
|
2024-09-30 06:29:14 +02:00
|
|
|
deleteFaces: vitest.fn(),
|
2023-07-03 00:46:20 +02:00
|
|
|
|
2024-04-16 16:44:45 +02:00
|
|
|
getStatistics: vitest.fn(),
|
|
|
|
getAllFaces: vitest.fn(),
|
|
|
|
getFacesByIds: vitest.fn(),
|
|
|
|
getRandomFace: vitest.fn(),
|
2023-12-05 16:43:15 +01:00
|
|
|
|
2024-04-16 16:44:45 +02:00
|
|
|
reassignFaces: vitest.fn(),
|
2024-09-30 06:29:14 +02:00
|
|
|
unassignFaces: vitest.fn(),
|
2024-10-04 03:58:28 +02:00
|
|
|
refreshFaces: vitest.fn(),
|
2024-04-16 16:44:45 +02:00
|
|
|
getFaces: vitest.fn(),
|
|
|
|
reassignFace: vitest.fn(),
|
|
|
|
getFaceById: vitest.fn(),
|
|
|
|
getFaceByIdWithAssets: vitest.fn(),
|
|
|
|
getNumberOfPeople: vitest.fn(),
|
2024-07-15 00:53:42 +02:00
|
|
|
getLatestFaceDate: vitest.fn(),
|
2023-05-17 19:07:17 +02:00
|
|
|
};
|
|
|
|
};
|