summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRobert Nagy <ronagy@icloud.com>2019-09-21 01:29:41 +0200
committerRich Trott <rtrott@gmail.com>2019-09-22 19:07:35 -0700
commitd398b8f02be73f2846a62080ebfbd65ede0c7d50 (patch)
tree7021c720db7cd607ed4ce5f4fc9f113cbc52ecd1 /test
parent68d6c4c661dd35c40f40a9c2957ac201c69f282d (diff)
downloadandroid-node-v8-d398b8f02be73f2846a62080ebfbd65ede0c7d50.tar.gz
android-node-v8-d398b8f02be73f2846a62080ebfbd65ede0c7d50.tar.bz2
android-node-v8-d398b8f02be73f2846a62080ebfbd65ede0c7d50.zip
stream: make _write() optional when _writev() is implemented
When implementing _writev, _write should be optional. PR-URL: https://github.com/nodejs/node/pull/29639 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-stream-writev.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/parallel/test-stream-writev.js b/test/parallel/test-stream-writev.js
index 1123e66ddc..7aba543f07 100644
--- a/test/parallel/test-stream-writev.js
+++ b/test/parallel/test-stream-writev.js
@@ -119,3 +119,12 @@ function test(decode, uncork, multi, next) {
next();
});
}
+
+{
+ const w = new stream.Writable({
+ writev: common.mustCall(function(chunks, cb) {
+ cb();
+ })
+ });
+ w.write('asd', common.mustCall());
+}