GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add coverage for pipeline · nodejs/node@c062ffc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-stream-pipeline.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-stream-pipeline.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-pipeline.js
+27Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,3 +1723,30 @@ tmpdir.refresh();
17231723
});
17241724
src.destroy(new Error('problem'));
17251725
}
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+
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.