test: add integration tests for CRUD, feedback, export and update CI workflow

This commit is contained in:
kartik-mem0
2026-03-19 15:48:35 +05:30
parent a14bc1ff24
commit 1b7c904b98
10 changed files with 287 additions and 230 deletions
@@ -105,4 +105,27 @@ describeIntegration("MemoryClient Integration — Search & History", () => {
expect(events).toContain("ADD");
});
});
// ─── Edge cases ─────────────────────────────────────────
describe("edge cases", () => {
test("search for non-existent user returns empty results", async () => {
const results = await client.search("anything", {
user_id: `nonexistent-user-${randomUUID()}`,
});
expect(Array.isArray(results)).toBe(true);
expect(results.length).toBe(0);
});
test("search with limit returns at most that many results", async () => {
const results = await waitForSearchResults(
client,
"Tell me about integration test user",
{ user_id: TEST_USER_ID, limit: 1 },
);
expect(Array.isArray(results)).toBe(true);
expect(results.length).toBeLessThanOrEqual(1);
});
});
});