diff options
author | Rich Trott <rtrott@gmail.com> | 2019-11-29 10:15:25 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-01 13:41:03 +0300 |
commit | 0132cddb6f4cc7797c127438378a39cce7aa930f (patch) | |
tree | 9d6fd7292c73d2c16e0d64e46f5d925256551661 /test/sequential | |
parent | 179f6611d59a23df086fc34dc72cc40fc9fdf074 (diff) |
test: simplify forEach() usage
Use an array literal instead of using split() on a very short string.
PR-URL: https://github.com/nodejs/node/pull/30712
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r-- | test/sequential/test-http-max-http-headers.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sequential/test-http-max-http-headers.js b/test/sequential/test-http-max-http-headers.js index f54d2385480..39f5033f060 100644 --- a/test/sequential/test-http-max-http-headers.js +++ b/test/sequential/test-http-max-http-headers.js @@ -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))); }); } |