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