Files
rea/src/hopper/HopperResponseStream.test.ts
T
morlutoandGitHub 4fbc501121 feat(native): add inspection primitives, dispatch traces and approved UI observation (#500)
* 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
2026-10-04 16:02:36 +08:00

26 lines
767 B
TypeScript

import { describe, expect, it } from "vitest";
import { HopperResponseStream } from "./HopperResponseStream.js";
describe("Hopper response stream", () => {
it("accepts complete responses larger than the former 10 MiB ceiling", () => {
const messages: unknown[] = [];
const failures: string[] = [];
const stream = new HopperResponseStream({
accept: (message) => {
messages.push(message);
return true;
},
hasQueued: () => false,
nextRequestId: () => 2,
abort: (message) => failures.push(message),
});
const line = `{"id":1,"result":"${"x".repeat(10 * 1024 * 1024 + 1)}"}`;
stream.push(`${line}\n`);
expect(failures).toEqual([]);
expect(messages).toEqual([JSON.parse(line)]);
});
});