mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
11 lines
381 B
TypeScript
11 lines
381 B
TypeScript
|
|
import { IDatabaseRepository, Version } from '@app/domain';
|
||
|
|
|
||
|
|
export const newDatabaseRepositoryMock = (): jest.Mocked<IDatabaseRepository> => {
|
||
|
|
return {
|
||
|
|
getExtensionVersion: jest.fn(),
|
||
|
|
getPostgresVersion: jest.fn().mockResolvedValue(new Version(14, 0, 0)),
|
||
|
|
createExtension: jest.fn().mockImplementation(() => Promise.resolve()),
|
||
|
|
runMigrations: jest.fn(),
|
||
|
|
};
|
||
|
|
};
|