Write the first stdin chunk after both readers start in the 'readable' EOF case

A reader that starts after the second chunk arrives reads both chunks in
one 'readable' event. On loaded test workers Node started that late while
the compiled program did not, so the two outputs differed. The first chunk
now waits 500 ms.
This commit is contained in:
Chris Tate
2026-10-24 09:56:15 -05:00
parent e579f62556
commit 38730910c8
+3 -1
View File
@@ -37,9 +37,11 @@ export const eventLoopCases: EventLoopCase[] = [
{
title: "stdio values: 'readable' drains with read(), then fires once more at EOF",
fixture: "stdio-readable.mjs",
// The first chunk waits until both readers run: a reader that starts
// after the second chunk arrives reads the two in one 'readable'.
script: {
writes: [
{ delayMs: 0, data: "alpha " },
{ delayMs: 500, data: "alpha " },
{ delayMs: 60, data: "beta\n" },
],
end: true,