Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/agent-core/src/__tests__/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,18 @@ describe('link', () => {
it('throws NOT_FOUND when not found and create=false', async () => {
mockFetch([{ status: 200, body: [] }]);
await expect(link({ name: 'missing' }, client)).rejects.toMatchObject({ code: 'NOT_FOUND' });


describe("parseExecInput edge cases", () => {
it("throws BAD_INPUT when provided an empty string or empty object json", () => {
expect(() => parseExecInput("")).toThrow();
expect(() => parseExecInput("{}")).toEqual({});
});

it("throws BAD_INPUT when provided invalid non-string non-object values", () => {
expect(() => parseExecInput("123")).toThrow();
expect(() => parseExecInput("true")).toThrow();
});
});
});
});
Loading