test: replace forEach with for..of in test-http2-server

PR-URL: https://github.com/nodejs/node/pull/49819
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Niya Shiyas authored and Luigi Pinca committed 2023-10-21 07:01:01 +02:00
1 parent fd562efcfe
commit 63e9d0282d
1 file changed
+2 -2
@@ -19,7 +19,7 @@ const types = [
server.on('stream', common.mustCall((stream) => {
const session = stream.session;
types.forEach((input) => {
for (const input of types) {
const received = common.invalidArgTypeHelper(input);
assert.throws(
() => session.goaway(input),
@@ -48,7 +48,7 @@ server.on('stream', common.mustCall((stream) => {
`TypedArray, or DataView.${received}`
}
);
});
}
stream.session.destroy();
}));