mirror of
https://github.com/nodejs/node.git
synced 2025-04-28 13:40:37 +00:00

* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: https://github.com/nodejs/node/pull/14021 Fixes: https://github.com/nodejs/node/issues/14016 Reviewed-By: Refael Ackermann <refack@gmail.com>
28 lines
491 B
JavaScript
28 lines
491 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const tls = require('tls');
|
|
const stream = require('stream');
|
|
|
|
const delay = new stream.Duplex({
|
|
read: function read() {
|
|
},
|
|
write: function write(data, enc, cb) {
|
|
console.log('pending');
|
|
setImmediate(function() {
|
|
console.log('done');
|
|
cb();
|
|
});
|
|
}
|
|
});
|
|
|
|
const secure = tls.connect({
|
|
socket: delay
|
|
});
|
|
setImmediate(function() {
|
|
secure.destroy();
|
|
});
|