summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2018-12-19 14:14:57 -0800
committerSam Roberts <vieuxtech@gmail.com>2018-12-28 12:57:46 -0800
commit00944c7cc25f391c3fbeba1e054a56a62cf0de12 (patch)
treeed5909000282156186e90a55c4a4696c628069c6 /test
parent03e23a3d10ba66141ff32d668e02a6ce1cdb6b46 (diff)
downloadandroid-node-v8-00944c7cc25f391c3fbeba1e054a56a62cf0de12.tar.gz
android-node-v8-00944c7cc25f391c3fbeba1e054a56a62cf0de12.tar.bz2
android-node-v8-00944c7cc25f391c3fbeba1e054a56a62cf0de12.zip
src: use consistent names for JSStream
Its confusing to call a js class with a handle a "Wrap", usually it's the C++ handle that is called a Wrap (tcp_wrap, tls_wrap, ...). Its derived from Socket, and makes a JS stream look like a Socket, so call it that. Also, remove use of lib/_stream_wrap.js so it can be deprecated some time. PR-URL: https://github.com/nodejs/node/pull/25153 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-stream-wrap-drain.js4
-rw-r--r--test/parallel/test-stream-wrap-encoding.js3
-rw-r--r--test/parallel/test-stream-wrap.js2
-rw-r--r--test/parallel/test-wrap-js-stream-destroy.js3
-rw-r--r--test/parallel/test-wrap-js-stream-duplex.js3
-rw-r--r--test/parallel/test-wrap-js-stream-exceptions.js2
-rw-r--r--test/parallel/test-wrap-js-stream-read-stop.js2
7 files changed, 11 insertions, 8 deletions
diff --git a/test/parallel/test-stream-wrap-drain.js b/test/parallel/test-stream-wrap-drain.js
index 068e2d7fd4..7724339951 100644
--- a/test/parallel/test-stream-wrap-drain.js
+++ b/test/parallel/test-stream-wrap-drain.js
@@ -2,12 +2,12 @@
'use strict';
const common = require('../common');
const assert = require('assert');
-const { StreamWrap } = require('_stream_wrap');
+const { StreamWrap } = require('internal/js_stream_socket');
const { Duplex } = require('stream');
const { internalBinding } = require('internal/test/binding');
const { ShutdownWrap } = internalBinding('stream_wrap');
-// This test makes sure that when an instance of JSStreamWrap is waiting for
+// This test makes sure that when a wrapped stream is waiting for
// a "drain" event to `doShutdown`, the instance will work correctly when a
// "drain" event emitted.
{
diff --git a/test/parallel/test-stream-wrap-encoding.js b/test/parallel/test-stream-wrap-encoding.js
index ce6f95fa27..72804d77d6 100644
--- a/test/parallel/test-stream-wrap-encoding.js
+++ b/test/parallel/test-stream-wrap-encoding.js
@@ -1,7 +1,8 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
-const StreamWrap = require('_stream_wrap');
+const StreamWrap = require('internal/js_stream_socket');
const Duplex = require('stream').Duplex;
{
diff --git a/test/parallel/test-stream-wrap.js b/test/parallel/test-stream-wrap.js
index 9a279790d8..670c05fe3f 100644
--- a/test/parallel/test-stream-wrap.js
+++ b/test/parallel/test-stream-wrap.js
@@ -4,7 +4,7 @@ const common = require('../common');
const assert = require('assert');
const { internalBinding } = require('internal/test/binding');
-const StreamWrap = require('_stream_wrap');
+const StreamWrap = require('internal/js_stream_socket');
const { Duplex } = require('stream');
const { ShutdownWrap } = internalBinding('stream_wrap');
diff --git a/test/parallel/test-wrap-js-stream-destroy.js b/test/parallel/test-wrap-js-stream-destroy.js
index 16d3e75e2c..5c1ed1e7e6 100644
--- a/test/parallel/test-wrap-js-stream-destroy.js
+++ b/test/parallel/test-wrap-js-stream-destroy.js
@@ -1,7 +1,8 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
-const StreamWrap = require('_stream_wrap');
+const StreamWrap = require('internal/js_stream_socket');
const net = require('net');
// This test ensures that when we directly call `socket.destroy()` without
diff --git a/test/parallel/test-wrap-js-stream-duplex.js b/test/parallel/test-wrap-js-stream-duplex.js
index 6bd860e6ba..6a817c1054 100644
--- a/test/parallel/test-wrap-js-stream-duplex.js
+++ b/test/parallel/test-wrap-js-stream-duplex.js
@@ -1,7 +1,8 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
const assert = require('assert');
-const StreamWrap = require('_stream_wrap');
+const StreamWrap = require('internal/js_stream_socket');
const { PassThrough } = require('stream');
const { Socket } = require('net');
diff --git a/test/parallel/test-wrap-js-stream-exceptions.js b/test/parallel/test-wrap-js-stream-exceptions.js
index 57ecd70189..cde7c17844 100644
--- a/test/parallel/test-wrap-js-stream-exceptions.js
+++ b/test/parallel/test-wrap-js-stream-exceptions.js
@@ -2,7 +2,7 @@
'use strict';
const common = require('../common');
const assert = require('assert');
-const JSStreamWrap = require('internal/wrap_js_stream');
+const JSStreamWrap = require('internal/js_stream_socket');
const { Duplex } = require('stream');
process.once('uncaughtException', common.mustCall((err) => {
diff --git a/test/parallel/test-wrap-js-stream-read-stop.js b/test/parallel/test-wrap-js-stream-read-stop.js
index f51b3ecf52..6d86dc2c21 100644
--- a/test/parallel/test-wrap-js-stream-read-stop.js
+++ b/test/parallel/test-wrap-js-stream-read-stop.js
@@ -3,7 +3,7 @@
require('../common');
const assert = require('assert');
-const WrapStream = require('internal/wrap_js_stream');
+const WrapStream = require('internal/js_stream_socket');
const Stream = require('stream');
class FakeStream extends Stream {