mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 22:56:06 +00:00

Fix running the tests when node was compiled without crypto
support. Some of these are cleanup after 52bae222a3
, where
common was used before it was required.
PR-URL: https://github.com/nodejs/node/pull/7056
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
21 lines
754 B
JavaScript
21 lines
754 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
if (!common.hasCrypto) {
|
|
common.skip('missing crypto');
|
|
return;
|
|
}
|
|
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);
|