1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00
immich/server/test/repositories/search.repository.mock.ts
Mert 7adb35e59e
fix(server): /search/random failing with certain options (#13040)
* fix relation handling, remove pagination

* update api, sql

* update mock
2024-09-30 00:29:35 -04:00

23 lines
721 B
TypeScript

import { ISearchRepository } from 'src/interfaces/search.interface';
import { Mocked, vitest } from 'vitest';
export const newSearchRepositoryMock = (): Mocked<ISearchRepository> => {
return {
searchMetadata: vitest.fn(),
searchSmart: vitest.fn(),
searchDuplicates: vitest.fn(),
searchFaces: vitest.fn(),
searchRandom: vitest.fn(),
upsert: vitest.fn(),
searchPlaces: vitest.fn(),
getAssetsByCity: vitest.fn(),
deleteAllSearchEmbeddings: vitest.fn(),
getDimensionSize: vitest.fn(),
setDimensionSize: vitest.fn(),
getCameraMakes: vitest.fn(),
getCameraModels: vitest.fn(),
getCities: vitest.fn(),
getCountries: vitest.fn(),
getStates: vitest.fn(),
};
};