We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 537e5cb commit b61ca1bCopy full SHA for b61ca1b
test/parallel/test-https-agent.js
@@ -35,7 +35,7 @@ const options = {
35
};
36
37
38
-const server = https.Server(options, function(req, res) {
+const server = https.Server(options, (req, res) => {
39
res.writeHead(200);
40
res.end('hello world\n');
41
});
@@ -46,9 +46,9 @@ const N = 4;
46
const M = 4;
47
48
49
-server.listen(0, function() {
+server.listen(0, () => {
50
for (let i = 0; i < N; i++) {
51
- setTimeout(function() {
+ setTimeout(() => {
52
for (let j = 0; j < M; j++) {
53
https.get({
54
path: '/',
@@ -58,7 +58,7 @@ server.listen(0, function() {
58
res.resume();
59
assert.strictEqual(res.statusCode, 200);
60
if (++responses === N * M) server.close();
61
- }).on('error', function(e) {
+ }).on('error', (e) => {
62
throw e;
63
64
}
@@ -67,6 +67,6 @@ server.listen(0, function() {
67
68
69
70
-process.on('exit', function() {
+process.on('exit', () => {
71
assert.strictEqual(responses, N * M);
72
0 commit comments