diff --git a/test/parallel/test-http2-server-shutdown-options-errors.js b/test/parallel/test-http2-server-shutdown-options-errors.js index e6a69b54627..5a2ca62a6c8 100644 --- a/test/parallel/test-http2-server-shutdown-options-errors.js +++ b/test/parallel/test-http2-server-shutdown-options-errors.js @@ -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(); }));