test(doctor): satisfy legacy migration lint · openclaw/openclaw@c7127c7
vincentkoc
·
2026-05-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -164,14 +164,12 @@ describe("doctor command", () => {
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
167 | | -let written: Record<string, unknown> | undefined; |
168 | | -for (const call of writeConfigFile.mock.calls) { |
| 167 | +const writtenCall = writeConfigFile.mock.calls.findLast((call) => { |
169 | 168 | const candidate = call[0] as Record<string, unknown>; |
170 | 169 | const auth = candidate.auth as { profiles?: unknown } | undefined; |
171 | | -if (auth?.profiles) { |
172 | | -written = candidate; |
173 | | -} |
174 | | -} |
| 170 | +return Boolean(auth?.profiles); |
| 171 | +}); |
| 172 | +const written = writtenCall?.[0] as Record<string, unknown> | undefined; |
175 | 173 | if (!written) { |
176 | 174 | throw new Error("Expected doctor to write migrated auth profiles"); |
177 | 175 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。