mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Use declarations style for functions.
This commit is contained in:
@@ -9,14 +9,14 @@ describe('A WrappedExpiringResourceLocker', (): void => {
|
||||
order = [];
|
||||
});
|
||||
|
||||
const registerEventOrder = async(eventSource: EventEmitter, event: string): Promise<void> => {
|
||||
async function registerEventOrder(eventSource: EventEmitter, event: string): Promise<void> {
|
||||
await new Promise((resolve): any => {
|
||||
eventSource.prependListener(event, (): any => {
|
||||
order.push(event);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
it('emits an error event when releasing the lock errors.', async(): Promise<void> => {
|
||||
jest.useFakeTimers();
|
||||
|
||||
Reference in New Issue
Block a user