test: compare tool mutation keys · openclaw/openclaw@5829694
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -24,14 +24,10 @@ describe("tool mutation helpers", () => {
|
24 | 24 | { path: "/tmp/demo.txt", id: 42 }, |
25 | 25 | "write /tmp/demo.txt", |
26 | 26 | ); |
27 | | -expect(writeFingerprint).toContain("tool=write"); |
28 | | -expect(writeFingerprint).toContain("path=/tmp/demo.txt"); |
29 | | -expect(writeFingerprint).toContain("id=42"); |
30 | | -expect(writeFingerprint).not.toContain("meta=write /tmp/demo.txt"); |
| 27 | +expect(writeFingerprint).toBe("tool=write|path=/tmp/demo.txt|id=42"); |
31 | 28 | |
32 | 29 | const metaOnlyFingerprint = buildToolActionFingerprint("exec", { command: "ls -la" }, "ls -la"); |
33 | | -expect(metaOnlyFingerprint).toContain("tool=exec"); |
34 | | -expect(metaOnlyFingerprint).toContain("meta=ls -la"); |
| 30 | +expect(metaOnlyFingerprint).toBe("tool=exec|meta=ls -la"); |
35 | 31 | |
36 | 32 | const readFingerprint = buildToolActionFingerprint("read", { path: "/tmp/demo.txt" }); |
37 | 33 | expect(readFingerprint).toBeUndefined(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。