mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Introducing initializers for handling lock cleanup on start
This commit is contained in:
committed by
Joachim Van Herwegen
parent
affcb7a7b3
commit
1c65b06392
11
test/unit/init/final/FinalizableHandler.test.ts
Normal file
11
test/unit/init/final/FinalizableHandler.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user