summaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-set-encoding.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-tls-set-encoding.js')
-rw-r--r--test/parallel/test-tls-set-encoding.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/parallel/test-tls-set-encoding.js b/test/parallel/test-tls-set-encoding.js
index 77cb5763ae..ad0fcf325d 100644
--- a/test/parallel/test-tls-set-encoding.js
+++ b/test/parallel/test-tls-set-encoding.js
@@ -40,6 +40,7 @@ const messageUtf8 = 'x√ab c';
const messageAscii = 'xb\b\u001aab c';
const server = tls.Server(options, common.mustCall(function(socket) {
+ console.log('server: on secureConnection', socket.getProtocol());
socket.end(messageUtf8);
}));
@@ -55,12 +56,18 @@ server.listen(0, function() {
client.setEncoding('ascii');
client.on('data', function(d) {
+ console.log('client: on data', d);
assert.ok(typeof d === 'string');
buffer += d;
});
+ client.on('secureConnect', common.mustCall(() => {
+ console.log('client: on secureConnect');
+ }));
+
+ client.on('close', common.mustCall(function() {
+ console.log('client: on close');
- client.on('close', function() {
// readyState is deprecated but we want to make
// sure this isn't triggering an assert in lib/net.js
// See https://github.com/nodejs/node-v0.x-archive/issues/1069.
@@ -75,5 +82,5 @@ server.listen(0, function() {
assert.strictEqual(messageAscii, buffer);
server.close();
- });
+ }));
});