diff --git a/mem0-ts/jest.integration.config.js b/mem0-ts/jest.integration.config.js index fcbe6052d..f9c0be7b2 100644 --- a/mem0-ts/jest.integration.config.js +++ b/mem0-ts/jest.integration.config.js @@ -2,8 +2,6 @@ module.exports = { ...require("./jest.config"), testMatch: ["**/integration/**/*.test.ts"], - globalSetup: "/src/client/tests/integration/global-setup.ts", - globalTeardown: "/src/client/tests/integration/global-teardown.ts", // Run integration tests serially to avoid rate limiting and race conditions maxWorkers: 1, }; diff --git a/mem0-ts/src/client/tests/integration/helpers.ts b/mem0-ts/src/client/tests/integration/helpers.ts index 3e3acf7ae..f7007042d 100644 --- a/mem0-ts/src/client/tests/integration/helpers.ts +++ b/mem0-ts/src/client/tests/integration/helpers.ts @@ -220,32 +220,3 @@ export async function cleanupTestUser( // ignore } } - -/** - * Full project wipe — deletes all memories and all entities. - * Equivalent to Python SDK's: - * client.delete_all(user_id="*", agent_id="*", app_id="*", run_id="*") - * - * Used as cleanup before and after integration test runs so tests - * start from a clean slate and don't leave data behind. - */ -export async function fullProjectCleanup(client: MemoryClient): Promise { - // Delete all memories — all four filters set explicitly - try { - await client.deleteAll({ - userId: "*", - agentId: "*", - appId: "*", - runId: "*", - }); - } catch { - // ignore — may 404 if no data exists - } - - // Delete all entities (users, agents, apps, runs) - try { - await client.deleteUsers(); - } catch { - // ignore — may throw "No entities to delete" - } -} diff --git a/mem0-ts/src/client/tests/integration/management.test.ts b/mem0-ts/src/client/tests/integration/management.test.ts index cbfd838f7..c4289d3ae 100644 --- a/mem0-ts/src/client/tests/integration/management.test.ts +++ b/mem0-ts/src/client/tests/integration/management.test.ts @@ -100,6 +100,7 @@ describeIntegration("MemoryClient Integration — Users & Project", () => { const hookName = `test-hook-${randomUUID().slice(0, 8)}`; const hookUrl = `https://example.com/webhook/${randomUUID().slice(0, 8)}`; const updatedName = `updated-hook-${randomUUID().slice(0, 8)}`; + const updatedUrl = `https://example.com/updated/${randomUUID().slice(0, 8)}`; afterAll(async () => { if (createdWebhookId) { @@ -168,7 +169,7 @@ describeIntegration("MemoryClient Integration — Users & Project", () => { client.updateWebhook({ webhookId: createdWebhookId, name: updatedName, - url: "https://example.com/updated", + url: updatedUrl, eventTypes: [WebhookEvent.MEMORY_DELETED], }), );