test: ground memory lancedb hook checks · openclaw/openclaw@7fa771b
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
File tree
extensions/memory-lancedb
| Original file line number | Diff line number | Diff line change |
|---|
@@ -101,7 +101,7 @@ function expectHookRegistered(on: ReturnType<typeof vi.fn>, hookName: string) {
|
101 | 101 | } |
102 | 102 | |
103 | 103 | function expectHookNotRegistered(on: ReturnType<typeof vi.fn>, hookName: string) { |
104 | | -expect(on.mock.calls.some(([name]) => name === hookName)).toBe(false); |
| 104 | +expect(on.mock.calls.map(([name]) => name)).not.toContain(hookName); |
105 | 105 | } |
106 | 106 | |
107 | 107 | function expectToolExecute(tool: unknown, name?: string) { |
@@ -1758,11 +1758,9 @@ describe("memory plugin e2e", () => {
|
1758 | 1758 | |
1759 | 1759 | expect(embeddingsCreate).toHaveBeenCalledTimes(2); |
1760 | 1760 | expect(harness.add).toHaveBeenCalledTimes(1); |
1761 | | -expect( |
1762 | | -harness.logger.warn.mock.calls.some(([message]) => |
1763 | | -String(message).includes("memory-lancedb: capture failed:"), |
1764 | | -), |
1765 | | -).toBe(true); |
| 1761 | +expect(harness.logger.warn.mock.calls.map(([message]) => String(message))).toEqual([ |
| 1762 | +"memory-lancedb: capture failed: Error: temporary embedding failure", |
| 1763 | +]); |
1766 | 1764 | } finally { |
1767 | 1765 | await cleanupAutoCaptureCursorHarness(); |
1768 | 1766 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。