Skip to content

Commit 658741b

Browse files
committed
test: refactor test-https-set-timeout-server
* Add common.mustCall() for error handlers. * Alphabetize modules PR-URL: #13032 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]>
1 parent 6bfdeed commit 658741b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/sequential/test-https-set-timeout-server.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121

2222
'use strict';
2323
const common = require('../common');
24-
const assert = require('assert');
2524

2625
if (!common.hasCrypto) {
2726
common.skip('missing crypto');
2827
return;
2928
}
30-
const https = require('https');
3129

32-
const tls = require('tls');
30+
const assert = require('assert');
3331
const fs = require('fs');
32+
const https = require('https');
33+
const tls = require('tls');
3434

3535
const tests = [];
3636

@@ -69,7 +69,7 @@ test(function serverTimeout(cb) {
6969
https.get({
7070
port: this.address().port,
7171
rejectUnauthorized: false
72-
}).on('error', common.noop);
72+
}).on('error', common.mustCall());
7373
}));
7474
});
7575

@@ -90,7 +90,7 @@ test(function serverRequestTimeout(cb) {
9090
method: 'POST',
9191
rejectUnauthorized: false
9292
});
93-
req.on('error', common.noop);
93+
req.on('error', common.mustCall());
9494
req.write('Hello');
9595
// req is in progress
9696
});
@@ -111,7 +111,7 @@ test(function serverResponseTimeout(cb) {
111111
https.get({
112112
port: this.address().port,
113113
rejectUnauthorized: false
114-
}).on('error', common.noop);
114+
}).on('error', common.mustCall());
115115
});
116116
});
117117

@@ -131,7 +131,7 @@ test(function serverRequestNotTimeoutAfterEnd(cb) {
131131
https.get({
132132
port: this.address().port,
133133
rejectUnauthorized: false
134-
}).on('error', common.noop);
134+
}).on('error', common.mustCall());
135135
});
136136
});
137137

0 commit comments

Comments
 (0)