2015-10-09 16:51:42 -06:00
|
|
|
'use strict';
|
|
|
|
|
2016-05-30 01:45:20 +02:00
|
|
|
const common = require('../common');
|
2017-07-01 02:29:09 +03:00
|
|
|
if (!common.hasCrypto)
|
2016-05-30 01:45:20 +02:00
|
|
|
common.skip('missing crypto');
|
2017-07-01 02:29:09 +03:00
|
|
|
|
2015-10-09 16:51:42 -06:00
|
|
|
const assert = require('assert');
|
|
|
|
const net = require('net');
|
|
|
|
const tls = require('tls');
|
|
|
|
const tty = require('tty');
|
|
|
|
|
|
|
|
// Check that the bytesWritten getter doesn't crash if object isn't
|
|
|
|
// constructed.
|
|
|
|
assert.strictEqual(net.Socket.prototype.bytesWritten, undefined);
|
|
|
|
assert.strictEqual(tls.TLSSocket.super_.prototype.bytesWritten, undefined);
|
|
|
|
assert.strictEqual(tls.TLSSocket.prototype.bytesWritten, undefined);
|
|
|
|
assert.strictEqual(tty.ReadStream.super_.prototype.bytesWritten, undefined);
|
|
|
|
assert.strictEqual(tty.ReadStream.prototype.bytesWritten, undefined);
|
|
|
|
assert.strictEqual(tty.WriteStream.prototype.bytesWritten, undefined);
|