summaryrefslogtreecommitdiffhomepage
path: root/src/adapters/ws/index.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/adapters/ws/index.test.ts')
-rw-r--r--src/adapters/ws/index.test.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/adapters/ws/index.test.ts b/src/adapters/ws/index.test.ts
index 92d57a8..e8e5434 100644
--- a/src/adapters/ws/index.test.ts
+++ b/src/adapters/ws/index.test.ts
@@ -283,11 +283,18 @@ describe("createSurfaceSocket", () => {
});
ws.resolveOpen();
- ws.invokeMessage(JSON.stringify({ type: "conversation.open", conversationId: "c1" }));
+ ws.invokeMessage(
+ JSON.stringify({
+ type: "conversation.open",
+ conversationId: "c1",
+ workspaceId: "w1",
+ }),
+ );
expect(onConversationOpen).toHaveBeenCalledOnce();
expect(onConversationOpen).toHaveBeenCalledWith({
type: "conversation.open",
conversationId: "c1",
+ workspaceId: "w1",
});
expect(onMessage).not.toHaveBeenCalled();
expect(onChat).not.toHaveBeenCalled();
@@ -310,6 +317,7 @@ describe("createSurfaceSocket", () => {
type: "conversation.statusChanged",
conversationId: "c1",
status: "active",
+ workspaceId: "w1",
}),
);
expect(onConversationStatusChanged).toHaveBeenCalledOnce();
@@ -317,6 +325,7 @@ describe("createSurfaceSocket", () => {
type: "conversation.statusChanged",
conversationId: "c1",
status: "active",
+ workspaceId: "w1",
});
expect(onMessage).not.toHaveBeenCalled();
});