Fixed the incorrect parameter type in the constructor of https.Agent (#9232)

This commit is contained in:
jacky.chen
2016-05-09 18:28:09 +10:00
committed by Horiuchi_H
parent 4119c4ab78
commit 557f086186
2 changed files with 33 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ import * as util from "util";
import * as crypto from "crypto";
import * as tls from "tls";
import * as http from "http";
import * as https from "https";
import * as net from "net";
import * as tty from "tty";
import * as dgram from "dgram";
@@ -367,6 +368,31 @@ namespace http_tests {
});
}
////////////////////////////////////////////////////
/// Https tests : http://nodejs.org/api/https.html
////////////////////////////////////////////////////
namespace https_tests {
var agent: https.Agent = new https.Agent({
keepAlive: true,
keepAliveMsecs: 10000,
maxSockets: Infinity,
maxFreeSockets: 256,
maxCachedSessions: 100
});
var agent: https.Agent = https.globalAgent;
https.request({
agent: false
});
https.request({
agent: agent
});
https.request({
agent: undefined
});
}
////////////////////////////////////////////////////
/// TTY tests : http://nodejs.org/api/tty.html
////////////////////////////////////////////////////