mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 03:15:54 +00:00
* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
27 lines
885 B
TypeScript
27 lines
885 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { execFileOutput } from "./ExecFileOutput.js";
|
|
|
|
describe("execFileOutput", () => {
|
|
it("captures output larger than Node's default execFile limit", async () => {
|
|
const marker = "tail-marker";
|
|
const result = await execFileOutput(process.execPath, [
|
|
"-e",
|
|
`process.stdout.write("x".repeat(2 * 1024 * 1024)); process.stdout.write(${JSON.stringify(marker)});`,
|
|
]);
|
|
|
|
expect(result.stdout).toHaveLength(2 * 1024 * 1024 + marker.length);
|
|
expect(result.stdout.endsWith(marker)).toBe(true);
|
|
});
|
|
|
|
it("enforces a caller supplied output bound", async () => {
|
|
await expect(
|
|
execFileOutput(
|
|
process.execPath,
|
|
["-e", 'process.stdout.write("x".repeat(1024))'],
|
|
{ maxBuffer: 64 },
|
|
),
|
|
).rejects.toMatchObject({ code: "ERR_CHILD_PROCESS_STDIO_MAXBUFFER" });
|
|
});
|
|
});
|