Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! no timers
  • Loading branch information
benjamingr committed Feb 14, 2022
commit fa333dd467a41990064829af077df80f785d26de
4 changes: 2 additions & 2 deletions test/parallel/test-stream-forEach.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
Readable,
} = require('stream');
const assert = require('assert');
const { setTimeout } = require('timers/promises');
const { once } = require('events');

{
// forEach works on synchronous streams with a synchronous predicate
Expand Down Expand Up @@ -95,7 +95,7 @@ const { setTimeout } = require('timers/promises');
const forEachPromise =
Readable.from([1, 2, 3, 4]).forEach(async (_, { signal }) => {
calls++;
await setTimeout(100, { signal });
await once(signal, 'abort');
}, { signal: ac.signal, concurrency: 2 });
// pump
assert.rejects(async () => {
Expand Down