Skip to content

The open-source app everyone uses to manage agents at work

test(adapter-utils): fix feedback request index in bridge round trip (#16507)

Nicky Leachc3ffa3f0dd0e
diff --git a/packages/adapter-utils/src/sandbox-callback-bridge.test.ts b/packages/adapter-utils/src/sandbox-callback-bridge.test.ts
index 9e356b8c8d..61e264709c 100644
--- a/packages/adapter-utils/src/sandbox-callback-bridge.test.ts
+++ b/packages/adapter-utils/src/sandbox-callback-bridge.test.ts
@@ -379,8 +379,9 @@ describe("sandbox callback bridge", () => {
});
expect(feedbackResponse.status).toBe(200);
await feedbackResponse.arrayBuffer();
- expect(seenRequests[2]).toMatchObject({ method: "POST", path: "/api/companies/company-1/agent-commentary", body: feedbackBody });
- expect(seenRequests[2]?.headers.authorization).toBeUndefined();
+ expect(seenRequests).toHaveLength(4);
+ expect(seenRequests[3]).toMatchObject({ method: "POST", path: "/api/companies/company-1/agent-commentary", body: feedbackBody });
+ expect(seenRequests[3]?.headers.authorization).toBeUndefined();
});