mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user