Skip to content
Permalink
Browse files

test: simplify forEach() usage

Use an array literal instead of using split() on a very short string.

PR-URL: #30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Nov 29, 2019
1 parent 276741a commit 5bb7bf37676647aa911715ede542eda4af6ef827
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/sequential/test-http-max-http-headers.js
@@ -25,7 +25,7 @@ function once(cb) {
}

function finished(client, callback) {
'abort error end'.split(' ').forEach((e) => {
['abort', 'error', 'end'].forEach((e) => {
client.on(e, once(() => setImmediate(callback)));
});
}

0 comments on commit 5bb7bf3

Please sign in to comment.
You can’t perform that action at this time.