summaryrefslogtreecommitdiffhomepage
path: root/src/adapters/ws/index.test.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-25 10:52:13 +0900
committerAdam Malczewski <[email protected]>2026-06-25 10:52:13 +0900
commitcd7f6cdfbd62bf4cf13c953bdb79d02158b6019e (patch)
tree765a10ae2d558083310f91854ee459835315294f /src/adapters/ws/index.test.ts
parentbaedda844cbf51f2106833084807a2775d64caa3 (diff)
downloaddispatch-web-cd7f6cdfbd62bf4cf13c953bdb79d02158b6019e.tar.gz
dispatch-web-cd7f6cdfbd62bf4cf13c953bdb79d02158b6019e.zip
feat(core): chunks retry-banner, wire conformance, ws logic, history adapter
- core/chunks: add retry-banner view-model (+test), update reducer/selectors/types - core/wire: update conformance checks (+test) - adapters/ws: update reconnect logic (+tests) - adapters/history: new client-side routing adapter (history + popstate wrapper)
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();
});