From 6bb09c5c863aa090da9e00faa638c1571fac40a7 Mon Sep 17 00:00:00 2001 From: Reddawn <35641620+forumevi@users.noreply.github.com> Date: Sat, 29 Aug 2026 20:57:22 +0300 Subject: [PATCH] Update client.test.ts --- packages/agent-core/src/__tests__/client.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/agent-core/src/__tests__/client.test.ts b/packages/agent-core/src/__tests__/client.test.ts index 4a164ff1e..ddfd431bb 100644 --- a/packages/agent-core/src/__tests__/client.test.ts +++ b/packages/agent-core/src/__tests__/client.test.ts @@ -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(); + }); }); }); +});