Skip to content

Commit 164031f

Browse files
committed
test: specify exec approval shortcut
1 parent 873c436 commit 164031f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/agents/bash-tools.exec-approval-request.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,23 @@ describe("requestExecApprovalDecision", () => {
241241
});
242242

243243
expect(result).toBe("deny");
244-
expect(vi.mocked(callGatewayTool).mock.calls).toHaveLength(1);
244+
expect(vi.mocked(callGatewayTool).mock.calls).toStrictEqual([
245+
[
246+
"exec.approval.request",
247+
{ timeoutMs: DEFAULT_APPROVAL_REQUEST_TIMEOUT_MS },
248+
expect.objectContaining({
249+
ask: "on-miss",
250+
command: "echo hi",
251+
cwd: "/tmp",
252+
host: "gateway",
253+
id: "approval-id",
254+
security: "allowlist",
255+
timeoutMs: DEFAULT_APPROVAL_TIMEOUT_MS,
256+
twoPhase: true,
257+
}),
258+
{ expectFinal: false },
259+
],
260+
]);
245261
});
246262

247263
it("adds command spans to host approval registration payloads", async () => {

0 commit comments

Comments
 (0)