test: tighten config validation assertions · openclaw/openclaw@c58e015
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -171,9 +171,7 @@ describe("validateConfigObjectWithPlugins channel metadata (applyDefaults: true)
|
171 | 171 | |
172 | 172 | expect(result.ok).toBe(true); |
173 | 173 | if (result.ok) { |
174 | | -expect(result.config.channels?.telegram).toEqual( |
175 | | -expect.objectContaining({ dmPolicy: "pairing" }), |
176 | | -); |
| 174 | +expect(result.config.channels?.telegram?.dmPolicy).toBe("pairing"); |
177 | 175 | } |
178 | 176 | }); |
179 | 177 | }); |
@@ -199,9 +197,7 @@ describe("validateConfigObjectRawWithPlugins channel metadata", () => {
|
199 | 197 | if (result.ok) { |
200 | 198 | // AJV defaults ARE injected into validated.config even in raw mode. |
201 | 199 | // This is intentional — see comment above. |
202 | | -expect(result.config.channels?.telegram).toEqual( |
203 | | -expect.objectContaining({ dmPolicy: "pairing" }), |
204 | | -); |
| 200 | +expect(result.config.channels?.telegram?.dmPolicy).toBe("pairing"); |
205 | 201 | } |
206 | 202 | }); |
207 | 203 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。