From 7fa771b665d23ef6970b9b4378a28cec1015b6f0 Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 21:20:46 +0100 Subject: [PATCH] test: ground memory lancedb hook checks --- extensions/memory-lancedb/index.test.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/extensions/memory-lancedb/index.test.ts b/extensions/memory-lancedb/index.test.ts index 707f5a1bcd4..b4d301c45c2 100644 --- a/extensions/memory-lancedb/index.test.ts +++ b/extensions/memory-lancedb/index.test.ts @@ -101,7 +101,7 @@ function expectHookRegistered(on: ReturnType, hookName: string) { } function expectHookNotRegistered(on: ReturnType, hookName: string) { - expect(on.mock.calls.some(([name]) => name === hookName)).toBe(false); + expect(on.mock.calls.map(([name]) => name)).not.toContain(hookName); } function expectToolExecute(tool: unknown, name?: string) { @@ -1758,11 +1758,9 @@ describe("memory plugin e2e", () => { expect(embeddingsCreate).toHaveBeenCalledTimes(2); expect(harness.add).toHaveBeenCalledTimes(1); - expect( - harness.logger.warn.mock.calls.some(([message]) => - String(message).includes("memory-lancedb: capture failed:"), - ), - ).toBe(true); + expect(harness.logger.warn.mock.calls.map(([message]) => String(message))).toEqual([ + "memory-lancedb: capture failed: Error: temporary embedding failure", + ]); } finally { await cleanupAutoCaptureCursorHarness(); }