mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 09:30:43 +00:00
test: tighten approval handler runtime assertion
This commit is contained in:
@@ -89,10 +89,10 @@ type ApprovalHandlerRuntime = NonNullable<Awaited<ReturnType<typeof createTestAp
|
||||
function expectApprovalRuntime(
|
||||
runtime: Awaited<ReturnType<typeof createTestApprovalHandler>>,
|
||||
): ApprovalHandlerRuntime {
|
||||
expect(runtime).toEqual(expect.objectContaining({ handleRequested: expect.any(Function) }));
|
||||
if (runtime === null) {
|
||||
throw new Error("Expected approval handler runtime");
|
||||
}
|
||||
expect(typeof runtime.handleRequested).toBe("function");
|
||||
return runtime;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user