summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-11-28 23:15:25 -0800
committerRich Trott <rtrott@gmail.com>2019-12-01 02:41:03 -0800
commit0132cddb6f4cc7797c127438378a39cce7aa930f (patch)
tree9d6fd7292c73d2c16e0d64e46f5d925256551661
parent179f6611d59a23df086fc34dc72cc40fc9fdf074 (diff)
downloadandroid-node-v8-0132cddb6f4cc7797c127438378a39cce7aa930f.tar.gz
android-node-v8-0132cddb6f4cc7797c127438378a39cce7aa930f.tar.bz2
android-node-v8-0132cddb6f4cc7797c127438378a39cce7aa930f.zip
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>
-rw-r--r--test/sequential/test-http-max-http-headers.js2
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 f54d238548..39f5033f06 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)));
});
}