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 targos committed Dec 2, 2019
1 parent 01ab031 commit d69b9b7
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 @@ -24,7 +24,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 d69b9b7

Please sign in to comment.