Skip to content

Commit 0132cdd

Browse files
committed
test: simplify forEach() usage
Use an array literal instead of using split() on a very short string. PR-URL: nodejs#30712 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 179f661 commit 0132cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/sequential/test-http-max-http-headers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function once(cb) {
2424
}
2525

2626
function finished(client, callback) {
27-
'abort error end'.split(' ').forEach((e) => {
27+
['abort', 'error', 'end'].forEach((e) => {
2828
client.on(e, once(() => setImmediate(callback)));
2929
});
3030
}

0 commit comments

Comments
 (0)