mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
test: add trailing commas in async-hooks tests (#45549)
PR-URL: https://github.com/nodejs/node/pull/45549 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
This commit is contained in:
parent
4f20c882ec
commit
cf46746b8a
49 changed files with 78 additions and 79 deletions
|
@ -21,7 +21,7 @@ let responses = 0;
|
|||
const agent = new http.Agent({
|
||||
keepAlive: true,
|
||||
keepAliveMsecs: Infinity,
|
||||
maxSockets: 1
|
||||
maxSockets: 1,
|
||||
});
|
||||
|
||||
const verifyRequest = (idx) => (res) => {
|
||||
|
@ -58,13 +58,13 @@ const server = http.createServer(common.mustCall((req, res) => {
|
|||
|
||||
// First request.
|
||||
const r1 = http.request({
|
||||
agent, port, method: 'POST'
|
||||
agent, port, method: 'POST',
|
||||
}, common.mustCall(verifyRequest(0)));
|
||||
r1.end(payload);
|
||||
|
||||
// Second request. Sent in parallel with the first one.
|
||||
const r2 = http.request({
|
||||
agent, port, method: 'POST'
|
||||
agent, port, method: 'POST',
|
||||
}, common.mustCall(verifyRequest(1)));
|
||||
r2.end(payload);
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue