Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(agent-contract): type the skew test's unpack

garrytan241af2a77d61
diff --git a/test/thin-client-contract-skew.test.ts b/test/thin-client-contract-skew.test.ts
index 499c9326e1..7356d9235a 100644
--- a/test/thin-client-contract-skew.test.ts
+++ b/test/thin-client-contract-skew.test.ts
@@ -74,7 +74,7 @@ describe('new client', () => {
test('success: body from content[0]; notices from _meta, else from prefixed blocks', () => {
const res = golden('bare-array-result.json');
- expect(unpackToolResult(res)).toEqual([]);
+ expect(unpackToolResult<unknown[]>(res)).toEqual([]);
expect(extractNotices(res)[0]).toMatchObject({ code: 'empty_retrieval', kind: 'info' });
const noMeta = { content: res.content };
expect(extractNotices(noMeta)[0]).toMatchObject({ code: 'empty_retrieval', kind: 'info', fix: 'gbrain doctor --json' });