node/test/parallel/test-stream-pipeline-with-empty-string.js
Qingyu Deng b9ef539eae
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>
2021-05-20 09:46:47 -07:00

19 lines
289 B
JavaScript

'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(() => {}));