Skip to content

Commit

Permalink
test: simplify forEach() usage
Browse files Browse the repository at this point in the history
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 Dec 17, 2019
1 parent 276741a commit 5bb7bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/sequential/test-http-max-http-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
});
}
Expand Down

0 comments on commit 5bb7bf3

Please sign in to comment.