mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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:
parent
fd562efcfe
commit
63e9d0282d
@ -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();
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user