summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-access-byteswritten.js
diff options
context:
space:
mode:
authordnlup <dwon.dnl@gmail.com>2019-03-26 12:28:25 +0100
committerMichaël Zasso <targos@protonmail.com>2019-03-30 13:13:42 +0100
commitf0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27 (patch)
tree98e8c40863c9ecc19784b2580a6e7dde995a725a /test/parallel/test-net-access-byteswritten.js
parente54f237afe53324ff6d6f1504a40f26b9fe7711c (diff)
downloadandroid-node-v8-f0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27.tar.gz
android-node-v8-f0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27.tar.bz2
android-node-v8-f0b3855a90bc5f68fe38ea5e7c69d30ae7d81a27.zip
net: remove usage of require('util')
Use `require('internal/util/inspect').inspect`, `require('internal/util/debuglog').debuglog`, `require('internal/util').deprecate` and `Object.setPrototypeOf` instead of `require('util')`. Fix test in `test/parallel/test-net-access-byteswritten.js` to do not check the `super_` property that was set when using `require('util').inherits`. Refs: https://github.com/nodejs/node/issues/26546 Refs: https://github.com/nodejs/node/pull/26896 PR-URL: https://github.com/nodejs/node/pull/26920 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-net-access-byteswritten.js')
-rw-r--r--test/parallel/test-net-access-byteswritten.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/parallel/test-net-access-byteswritten.js b/test/parallel/test-net-access-byteswritten.js
index c928ab27c6..da63d68f6c 100644
--- a/test/parallel/test-net-access-byteswritten.js
+++ b/test/parallel/test-net-access-byteswritten.js
@@ -12,8 +12,10 @@ 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(Object.getPrototypeOf(tls.TLSSocket).prototype.bytesWritten,
+ undefined);
assert.strictEqual(tls.TLSSocket.prototype.bytesWritten, undefined);
-assert.strictEqual(tty.ReadStream.super_.prototype.bytesWritten, undefined);
+assert.strictEqual(Object.getPrototypeOf(tty.ReadStream).prototype.bytesWritten,
+ undefined);
assert.strictEqual(tty.ReadStream.prototype.bytesWritten, undefined);
assert.strictEqual(tty.WriteStream.prototype.bytesWritten, undefined);