test: tighten approval handler runtime assertion · openclaw/openclaw@84273ae
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -89,10 +89,10 @@ type ApprovalHandlerRuntime = NonNullable<Awaited<ReturnType<typeof createTestAp
|
89 | 89 | function expectApprovalRuntime( |
90 | 90 | runtime: Awaited<ReturnType<typeof createTestApprovalHandler>>, |
91 | 91 | ): ApprovalHandlerRuntime { |
92 | | -expect(runtime).toEqual(expect.objectContaining({ handleRequested: expect.any(Function) })); |
93 | 92 | if (runtime === null) { |
94 | 93 | throw new Error("Expected approval handler runtime"); |
95 | 94 | } |
| 95 | +expect(typeof runtime.handleRequested).toBe("function"); |
96 | 96 | return runtime; |
97 | 97 | } |
98 | 98 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。