node/test/parallel/test-tls-destroy-whilst-write.js
Rich Trott 3d23567622 test: remove unused variables from TLS tests
Some of the TLS tests have variables that do not get used. This removes
those variables.

PR-URL: https://github.com/nodejs/node/pull/4424
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-12-28 20:01:47 -08:00

29 lines
513 B
JavaScript

'use strict';
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
return;
}
var tls = require('tls');
var stream = require('stream');
var delay = new stream.Duplex({
read: function read() {
},
write: function write(data, enc, cb) {
console.log('pending');
setTimeout(function() {
console.log('done');
cb();
}, 200);
}
});
var secure = tls.connect({
socket: delay
});
setImmediate(function() {
secure.destroy();
});