test(discord): accept delivery origin on spawn

This commit is contained in:
Craig
2026-05-17 12:20:00 -04:00
committed by Peter Steinberger
parent 61d583d59d
commit 70c326f2be

View File

@@ -339,7 +339,16 @@ describe("discord subagent hook handlers", () => {
});
expect(hookMocks.autoBindSpawnedDiscordSubagent).toHaveBeenCalledTimes(1);
expect(result).toStrictEqual({ status: "ok", threadBindingReady: true });
expect(result).toMatchObject({
status: "ok",
threadBindingReady: true,
deliveryOrigin: {
channel: "discord",
accountId: "work",
to: "channel:thread-1",
threadId: "thread-1",
},
});
});
it("defaults thread-bound subagent spawn to enabled when unset", async () => {
@@ -352,7 +361,16 @@ describe("discord subagent hook handlers", () => {
});
expect(hookMocks.autoBindSpawnedDiscordSubagent).toHaveBeenCalledTimes(1);
expect(result).toStrictEqual({ status: "ok", threadBindingReady: true });
expect(result).toMatchObject({
status: "ok",
threadBindingReady: true,
deliveryOrigin: {
channel: "discord",
accountId: "work",
to: "channel:thread-1",
threadId: "thread-1",
},
});
});
it("no-ops when thread binding is requested on non-discord channel", async () => {