fix: ensure lock stays on

This commit is contained in:
Jonathan Jogenfors
2024-02-29 19:02:27 +01:00
parent eda6572c87
commit 3db28aaa92
4 changed files with 8 additions and 23 deletions

View File

@@ -13,6 +13,7 @@ export const newDatabaseRepositoryMock = (): jest.Mocked<IDatabaseRepository> =>
shouldReindex: jest.fn(),
runMigrations: jest.fn(),
withLock: jest.fn().mockImplementation((_, function_: <R>() => Promise<R>) => function_()),
tryLock: jest.fn(),
isBusy: jest.fn(),
wait: jest.fn(),
};