test: replace forEach with for..of in test-http2-client-destroy.js

PR-URL: https://github.com/nodejs/node/pull/49820
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Niya Shiyas
2023-10-21 10:29:05 +05:30
committed by GitHub
parent 2e5ffe9fcf
commit fd562efcfe

View File

@@ -22,7 +22,7 @@ const { getEventListeners } = require('events');
server.close();
});
destroyCallbacks.forEach((destroyCallback) => {
for (const destroyCallback of destroyCallbacks) {
const client = h2.connect(`http://localhost:${server.address().port}`);
client.on('connect', common.mustCall(() => {
const socket = client[kSocket];
@@ -45,7 +45,7 @@ const { getEventListeners } = require('events');
countdown.dec();
}));
});
}
}));
}