We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1592d0a commit 87c5750Copy full SHA for 87c5750
test/parallel/test-stream-readable-async-iterators.js
@@ -270,6 +270,22 @@ async function tests() {
270
assert.strictEqual(received, 1);
271
}
272
273
+ {
274
+ console.log('destroyed will not deadlock');
275
+ const readable = new Readable();
276
+ readable.destroy();
277
+ process.nextTick(async () => {
278
+ readable.on('close', common.mustNotCall());
279
+ let received = 0;
280
+ for await (const k of readable) {
281
+ // Just make linting pass. This should never run.
282
+ assert.strictEqual(k, 'hello');
283
+ received++;
284
+ }
285
+ assert.strictEqual(received, 0);
286
+ });
287
288
+
289
{
290
console.log('push async');
291
const max = 42;
0 commit comments