refactor: Use declarations style for functions.

This commit is contained in:
Ruben Verborgh
2021-01-06 11:24:43 +01:00
parent e70e060225
commit f9a20799eb
23 changed files with 208 additions and 162 deletions

View File

@@ -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();