test(tools): remove redundant result assertions

This commit is contained in:
abhinav7x94 2026-08-16 08:17:45 +05:30
parent d09b7026f9
commit 7573bd6ae8

View file

@ -122,10 +122,10 @@ describe("configured container scope", () => {
const implicitResult = await openAi.createDocumentListFunction(API_KEY)({
containerTag: "tenant-b",
})
const projectResult = (await executeTool(
const projectResult = await executeTool(
aiSdk.getProfileTool(API_KEY, { projectId: "alpha" }),
{ containerTag: "tenant-b" },
)) as { success: boolean; error?: string }
)
expect(implicitResult.success).toBe(false)
expect(implicitResult.error).toContain("outside the configured scope")
@ -151,9 +151,7 @@ describe("configured container scope", () => {
describe("documentDelete", () => {
it("ai-sdk variant passes the document id string to the SDK", async () => {
const tool = aiSdk.documentDeleteTool(API_KEY)
const result = (await executeTool(tool, { documentId: "doc_123" })) as {
success: boolean
}
const result = await executeTool(tool, { documentId: "doc_123" })
expect(result.success).toBe(true)
expect(documentsDelete).toHaveBeenCalledWith("doc_123")
@ -244,9 +242,9 @@ describe("memoryForget", () => {
containerTags: ["user_2"],
})
const result = (await executeTool(tool, {
const result = await executeTool(tool, {
memoryContent: "stale fact",
})) as { success: boolean }
})
expect(result.success).toBe(true)
const [, init] = fetchMock.mock.calls[0] as [string, RequestInit]