refactor: Prevent for-each calls

This commit is contained in:
Joachim Van Herwegen
2023-10-30 16:58:39 +01:00
parent 20d4a0c3af
commit c9e4c7041c
7 changed files with 13 additions and 9 deletions

View File

@@ -198,7 +198,9 @@ describeIf('docker')('A server with a RedisLocker', (): void => {
countdown -= 1;
// Start releasing locks after 3 inits of the promises below
if (countdown === 0) {
[ 1, 0, 2 ].forEach((num): unknown => releaseSignal.emit(`release${num}`));
for (const num of [ 1, 0, 2 ]) {
releaseSignal.emit(`release${num}`);
}
}
});
const promises = [ 0, 1, 2 ].map(async(num): Promise<any> =>