mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-09 03:18:04 +00:00
test(tools): remove redundant result assertions
This commit is contained in:
parent
d09b7026f9
commit
7573bd6ae8
1 changed files with 5 additions and 7 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue