summaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-timeout-server-2.js
diff options
context:
space:
mode:
authorEvan Lucas <evanlucas@me.com>2015-05-13 21:25:57 -0500
committerRoman Reiss <me@silverwind.io>2015-05-16 07:17:41 +0200
commitd4726cde57856896c560820b89eae0bc08621034 (patch)
tree01e5ec875240d6e0fb9a7b4e8cfba309dd271a44 /test/parallel/test-tls-timeout-server-2.js
parentc7fb91dc1310f9454d4aa8091bcc6d305322a72f (diff)
downloadnode-new-d4726cde57856896c560820b89eae0bc08621034.tar.gz
http,net,tls: return this from setTimeout methods
Modifies the setTimeout methods for the following prototypes: - http.ClientRequest - http.IncomingMessage - http.OutgoingMessage - http.Server - https.Server - net.Socket - tls.TLSSocket Previously, the above functions returned undefined. They now return `this`. This is useful for chaining function calls. PR-URL: https://github.com/nodejs/io.js/pull/1699 Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'test/parallel/test-tls-timeout-server-2.js')
-rw-r--r--test/parallel/test-tls-timeout-server-2.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-tls-timeout-server-2.js b/test/parallel/test-tls-timeout-server-2.js
index a16ce33167..dc3d52da01 100644
--- a/test/parallel/test-tls-timeout-server-2.js
+++ b/test/parallel/test-tls-timeout-server-2.js
@@ -15,10 +15,11 @@ var options = {
};
var server = tls.createServer(options, function(cleartext) {
- cleartext.setTimeout(50, function() {
+ var s = cleartext.setTimeout(50, function() {
cleartext.destroy();
server.close();
});
+ assert.ok(s instanceof tls.TLSSocket);
});
server.listen(common.PORT, function() {