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 { FinalizableHandler } from '../../../../src';
describe('FinalizableHandler', (): void => {
const finalizable = { finalize: jest.fn() };
const finalizer = new FinalizableHandler(finalizable);
it('redirects handle towards finalize.', async(): Promise<void> => {
await finalizer.handleSafe();
expect(finalizable.finalize).toHaveBeenCalledTimes(1);
});
});