test: tighten memory wiki schema assertion · openclaw/openclaw@af5eca9
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -29,10 +29,6 @@ const MEMORY_EMBEDDING_PROVIDERS_KEY = Symbol.for("openclaw.memoryEmbeddingProvi
|
29 | 29 | const MCPORTER_STATE_KEY = Symbol.for("openclaw.mcporterState"); |
30 | 30 | const QMD_EMBED_QUEUE_KEY = Symbol.for("openclaw.qmdEmbedQueueTail"); |
31 | 31 | |
32 | | -async function expectPathMissing(targetPath: string): Promise<void> { |
33 | | -await expect(fs.lstat(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); |
34 | | -} |
35 | | - |
36 | 32 | interface MockChild extends EventEmitter { |
37 | 33 | stdout: EventEmitter; |
38 | 34 | stderr: EventEmitter; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import { createWikiApplyTool } from "./tool.js";
|
4 | 4 | |
5 | 5 | function asSchemaObject(value: unknown): Record<string, unknown> { |
6 | 6 | expect(typeof value).toBe("object"); |
7 | | -expect(value).toEqual(expect.any(Object)); |
| 7 | +expect(value).not.toBeNull(); |
8 | 8 | expect(Array.isArray(value)).toBe(false); |
9 | 9 | if (typeof value !== "object" || value === null || Array.isArray(value)) { |
10 | 10 | throw new Error("Expected JSON schema object"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。