test(line): narrow config schema parse failures · openclaw/openclaw@ecf06d7
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,9 @@ describe("LineConfigSchema", () => {
|
9 | 9 | dmPolicy: "open", |
10 | 10 | }); |
11 | 11 | |
12 | | -expect(result.success).toBe(false); |
| 12 | +if (result.success) { |
| 13 | +throw new Error("Expected config validation to fail"); |
| 14 | +} |
13 | 15 | expect(result.error.issues).toEqual([ |
14 | 16 | expect.objectContaining({ |
15 | 17 | path: ["allowFrom"], |
@@ -40,7 +42,9 @@ describe("LineConfigSchema", () => {
|
40 | 42 | }, |
41 | 43 | }); |
42 | 44 | |
43 | | -expect(result.success).toBe(false); |
| 45 | +if (result.success) { |
| 46 | +throw new Error("Expected account config validation to fail"); |
| 47 | +} |
44 | 48 | expect(result.error.issues).toEqual([ |
45 | 49 | expect.objectContaining({ |
46 | 50 | path: ["accounts", "work", "allowFrom"], |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。