diff options
author | Qingyu Deng <bitdqy@hotmail.com> | 2021-05-18 18:30:13 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-05-20 19:46:47 +0300 |
commit | b9ef539eae9a86763f72e50eda68cfde29db485d (patch) | |
tree | 559bb24a2986f98aef200c73b60c96d21be63b38 /test | |
parent | c32c5f0d433996695bcef02737038b0213f1831e (diff) |
stream: allow empty string as source of pipeline
Fixes: https://github.com/nodejs/node/issues/38721
PR-URL: https://github.com/nodejs/node/pull/38723
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-stream-pipeline-with-empty-string.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/parallel/test-stream-pipeline-with-empty-string.js b/test/parallel/test-stream-pipeline-with-empty-string.js new file mode 100644 index 00000000000..8818f38e859 --- /dev/null +++ b/test/parallel/test-stream-pipeline-with-empty-string.js @@ -0,0 +1,18 @@ +'use strict'; + +const common = require('../common'); +const { + pipeline, + PassThrough +} = require('stream'); + + +async function runTest() { + await pipeline( + '', + new PassThrough({ objectMode: true }), + common.mustCall(() => { }) + ); +} + +runTest().then(common.mustCall(() => {})); |