Skip to content

Commit cb76bc7

Browse files
committed
fixup! stream: add diagnostics_channel event for completion
Signed-off-by: Bryan English <[email protected]>
1 parent d3a3038 commit cb76bc7

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/internal/webstreams/readablestream.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,11 @@ class ReadableStream {
501501
}
502502
const promise = PromiseWithResolvers();
503503

504-
// eslint-disable-next-line no-use-before-define
505-
readableStreamDefaultReaderRead(reader, new ReadableStreamAsyncIteratorReadRequest(reader, state, promise, stream, channel));
504+
readableStreamDefaultReaderRead(
505+
reader,
506+
// eslint-disable-next-line no-use-before-define
507+
new ReadableStreamAsyncIteratorReadRequest(reader, state, promise, stream, channel),
508+
);
506509
return promise.promise;
507510
}
508511

test/parallel/test-whatwg-webstreams-dc-events.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ import * as dc from 'diagnostics_channel';
3838
});
3939
channel.subscribe(subscriber);
4040

41-
for await (const _ of readable) {}
41+
// eslint-disable-next-line no-unused-vars
42+
for await (const _ of readable) { /* drain */ }
4243

4344
channel.unsubscribe(subscriber);
4445
}

0 commit comments

Comments
 (0)