test: dedupe security cli mock reads · openclaw/openclaw@00a01d1
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -76,13 +76,13 @@ function primeDeepAuditConfig(sourceConfig = { gateway: { mode: "local" } }) {
|
76 | 76 | } |
77 | 77 | |
78 | 78 | function lastSecretResolverOptions(): Record<string, unknown> | undefined { |
79 | | -return resolveCommandSecretRefsViaGateway.mock.calls.at(-1)?.[0] as |
80 | | -| Record<string, unknown> |
81 | | -| undefined; |
| 79 | +const calls = resolveCommandSecretRefsViaGateway.mock.calls; |
| 80 | +return calls[calls.length - 1]?.[0] as Record<string, unknown> | undefined; |
82 | 81 | } |
83 | 82 | |
84 | 83 | function lastSecurityAuditOptions(): Record<string, unknown> | undefined { |
85 | | -return runSecurityAudit.mock.calls.at(-1)?.[0] as Record<string, unknown> | undefined; |
| 84 | +const calls = runSecurityAudit.mock.calls; |
| 85 | +return calls[calls.length - 1]?.[0] as Record<string, unknown> | undefined; |
86 | 86 | } |
87 | 87 | |
88 | 88 | describe("security CLI", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。