A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nodejs/node/commit/c062ffc242 below:

add coverage for pipeline · nodejs/node@c062ffc · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+27

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+27

-0

lines changed Original file line number Diff line number Diff line change

@@ -1723,3 +1723,30 @@ tmpdir.refresh();

1723 1723

});

1724 1724

src.destroy(new Error('problem'));

1725 1725

}

1726 + 1727 +

{

1728 +

async function* myAsyncGenerator(ag) {

1729 +

for await (const data of ag) {

1730 +

yield data;

1731 +

}

1732 +

}

1733 + 1734 +

const duplexStream = Duplex.from(myAsyncGenerator);

1735 + 1736 +

const r = new Readable({

1737 +

read() {

1738 +

this.push('data1\n');

1739 +

throw new Error('booom');

1740 +

},

1741 +

});

1742 + 1743 +

const w = new Writable({

1744 +

write(chunk, encoding, callback) {

1745 +

callback();

1746 +

},

1747 +

});

1748 + 1749 +

pipeline(r, duplexStream, w, common.mustCall((err) => {

1750 +

assert.deepStrictEqual(err, new Error('booom'));

1751 +

}));

1752 +

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4