chore(server): refactor locks (#5953)
* lock refactor * add mocks * add await * move database repo injection to service * update tests * add mock implementation * remove unused imports * this
This commit is contained in:
@@ -6,5 +6,8 @@ export const newDatabaseRepositoryMock = (): jest.Mocked<IDatabaseRepository> =>
|
||||
getPostgresVersion: jest.fn().mockResolvedValue(new Version(14, 0, 0)),
|
||||
createExtension: jest.fn().mockImplementation(() => Promise.resolve()),
|
||||
runMigrations: jest.fn(),
|
||||
withLock: jest.fn().mockImplementation((_, func: <R>() => Promise<R>) => func()),
|
||||
isBusy: jest.fn(),
|
||||
wait: jest.fn(),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user