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/InitializableHandler.test.ts
Normal file
11
test/unit/init/InitializableHandler.test.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user