| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b5e4adf commit 0185e3a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1032,3 +1032,20 @@ const { promisify } = require('util'); | |||
| 1032 | 1032 | })); | |
| 1033 | 1033 | src.push(null); | |
| 1034 | 1034 | } | |
| 1035 | + | ||
| 1036 | + { | ||
| 1037 | + const src = new PassThrough(); | ||
| 1038 | + const dst = pipeline( | ||
| 1039 | + src, | ||
| 1040 | + async function * (source) { | ||
| 1041 | + for await (const chunk of source) { | ||
| 1042 | + yield chunk; | ||
| 1043 | + } | ||
| 1044 | + }, | ||
| 1045 | + common.mustCall((err) => { | ||
| 1046 | + assert.strictEqual(err.code, 'ERR_STREAM_PREMATURE_CLOSE'); | ||
| 1047 | + }) | ||
| 1048 | + ); | ||
| 1049 | + src.push('asd'); | ||
| 1050 | + dst.destroy(); | ||
| 1051 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments