Files
reverse-engineering-anything/src/application/desktop/AgentEnvNoteRecords.test.ts
T
morluto 41fc470072 fix(ci): verify packaged Agent Environment bridges (#12874)
* test(agentenv): observe timeout before polling a pending run

* test(agentenv): verify bridge files at package boundary
2026-11-20 16:06:14 +00:00

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);
});