Skip to content

Commit

Permalink
test: replace anonymous functions by arrows
Browse files Browse the repository at this point in the history
PR-URL: #36125
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
  • Loading branch information
arsenalzp authored and danielleadams committed Dec 7, 2020
1 parent 537e5cb commit b61ca1b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-https-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const options = {
};


const server = https.Server(options, function(req, res) {
const server = https.Server(options, (req, res) => {
res.writeHead(200);
res.end('hello world\n');
});
Expand All @@ -46,9 +46,9 @@ const N = 4;
const M = 4;


server.listen(0, function() {
server.listen(0, () => {
for (let i = 0; i < N; i++) {
setTimeout(function() {
setTimeout(() => {
for (let j = 0; j < M; j++) {
https.get({
path: '/',
Expand All @@ -58,7 +58,7 @@ server.listen(0, function() {
res.resume();
assert.strictEqual(res.statusCode, 200);
if (++responses === N * M) server.close();
}).on('error', function(e) {
}).on('error', (e) => {
throw e;
});
}
Expand All @@ -67,6 +67,6 @@ server.listen(0, function() {
});


process.on('exit', function() {
process.on('exit', () => {
assert.strictEqual(responses, N * M);
});

0 comments on commit b61ca1b

Please sign in to comment.