diff --git a/packages/sandbox/sandbox-windows-acl/tests/control.spec.ts b/packages/sandbox/sandbox-windows-acl/tests/control.spec.ts index d63357f328..d53b657bad 100644 --- a/packages/sandbox/sandbox-windows-acl/tests/control.spec.ts +++ b/packages/sandbox/sandbox-windows-acl/tests/control.spec.ts @@ -37,7 +37,7 @@ describe.skipIf(process.platform !== 'win32')('managed Windows ACL control pipe' const chunks = []; let received = 0; channel.on('data', chunk => { chunks.push(chunk); received += chunk.length; - if (received === 262144) channel.end(Buffer.concat(chunks), () => channel.destroy()); + if (received === 262144) channel.write(Buffer.concat(chunks), () => channel.destroy()); }); ` const handle = ctx.subprocess.spawn({ diff --git a/packages/subprocess/subprocess-local/tests/fixtures/control-child.ts b/packages/subprocess/subprocess-local/tests/fixtures/control-child.ts index e8a0073906..888f0ee5c2 100644 --- a/packages/subprocess/subprocess-local/tests/fixtures/control-child.ts +++ b/packages/subprocess/subprocess-local/tests/fixtures/control-child.ts @@ -16,6 +16,6 @@ channel.on('data', (chunk: Buffer) => { received += chunk.length if (received === size) { channel.removeAllListeners('data') - channel.end(Buffer.concat(chunks), () => { channel.destroy() }) + channel.write(Buffer.concat(chunks), () => { channel.destroy() }) } })