test(gateway): cover internal provider defaults
This commit is contained in:
@@ -268,7 +268,10 @@ describe("sessions tools", () => {
|
||||
);
|
||||
expect(agentCalls).toHaveLength(8);
|
||||
for (const call of agentCalls) {
|
||||
expect(call.params).toMatchObject({ lane: "nested" });
|
||||
expect(call.params).toMatchObject({
|
||||
lane: "nested",
|
||||
provider: "webchat",
|
||||
});
|
||||
}
|
||||
expect(
|
||||
agentCalls.some(
|
||||
@@ -394,6 +397,15 @@ describe("sessions tools", () => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
|
||||
const agentCalls = calls.filter((call) => call.method === "agent");
|
||||
expect(agentCalls).toHaveLength(4);
|
||||
for (const call of agentCalls) {
|
||||
expect(call.params).toMatchObject({
|
||||
lane: "nested",
|
||||
provider: "webchat",
|
||||
});
|
||||
}
|
||||
|
||||
const replySteps = calls.filter(
|
||||
(call) =>
|
||||
call.method === "agent" &&
|
||||
|
||||
@@ -169,6 +169,12 @@ describe("subagents", () => {
|
||||
expect(first?.provider).toBe("discord");
|
||||
expect(first?.sessionKey?.startsWith("agent:main:subagent:")).toBe(true);
|
||||
expect(childSessionKey?.startsWith("agent:main:subagent:")).toBe(true);
|
||||
const second = agentCalls[1]?.params as
|
||||
| { provider?: string; deliver?: boolean; lane?: string }
|
||||
| undefined;
|
||||
expect(second?.lane).toBe("nested");
|
||||
expect(second?.deliver).toBe(false);
|
||||
expect(second?.provider).toBe("webchat");
|
||||
|
||||
expect(sendParams.provider).toBe("discord");
|
||||
expect(sendParams.to).toBe("channel:req");
|
||||
|
||||
Reference in New Issue
Block a user