mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 14:05:49 +00:00
* test(agentenv): observe timeout before polling a pending run * test(agentenv): verify bridge files at package boundary
19 lines
565 B
TypeScript
19 lines
565 B
TypeScript
import { expect, it } from "vitest";
|
|
|
|
import { parseAgentEnvNotes } from "../../../tests/fixtures/fakeAgentEnvComputer.js";
|
|
|
|
const record = { id: 1, kind: "call" };
|
|
|
|
it("keeps complete note records and an unfinished trailing fragment", () => {
|
|
expect(parseAgentEnvNotes(`${JSON.stringify(record)}\n{"id":`)).toEqual([
|
|
record,
|
|
]);
|
|
expect(parseAgentEnvNotes("")).toEqual([]);
|
|
});
|
|
|
|
it("rejects a newline-terminated note that is not a record", () => {
|
|
expect(() =>
|
|
parseAgentEnvNotes(`${JSON.stringify(record)}\n{bad}\n`),
|
|
).toThrow(SyntaxError);
|
|
});
|