mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60759 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
57 files changed
+246
-286
No files matched your search
@@ -46,11 +46,11 @@ function unauthorized() {
|
||||
const req = https.request({
|
||||
port: server.address().port,
|
||||
rejectUnauthorized: false
|
||||
}, function(res) {
|
||||
}, common.mustCall((res) => {
|
||||
assert(!req.socket.authorized);
|
||||
res.resume();
|
||||
rejectUnauthorized();
|
||||
});
|
||||
}));
|
||||
req.on('error', function(err) {
|
||||
throw err;
|
||||
});
|
||||
@@ -75,11 +75,11 @@ function authorized() {
|
||||
ca: [fixtures.readKey('rsa_cert.crt')]
|
||||
};
|
||||
options.agent = new https.Agent(options);
|
||||
const req = https.request(options, function(res) {
|
||||
const req = https.request(options, common.mustCall((res) => {
|
||||
res.resume();
|
||||
assert(req.socket.authorized);
|
||||
server.close();
|
||||
});
|
||||
}));
|
||||
req.on('error', common.mustNotCall());
|
||||
req.end();
|
||||
}
|
||||
Reference in new issue
Block a user