fix: Introducing initializers for handling lock cleanup on start

This commit is contained in:
Wannes Kerckhove
2022-05-30 15:49:22 +02:00
committed by Joachim Van Herwegen
parent affcb7a7b3
commit 1c65b06392
32 changed files with 415 additions and 144 deletions

View File

@@ -0,0 +1,11 @@
import { InitializableHandler } from '../../../src';
describe('InitializableHandler', (): void => {
const initializable = { initialize: jest.fn() };
const initializer = new InitializableHandler(initializable);
it('redirects handle towards initialize.', async(): Promise<void> => {
await initializer.handleSafe();
expect(initializable.initialize).toHaveBeenCalledTimes(1);
});
});