test: tighten tlon sse subscription assertions

This commit is contained in:
Shakker
2026-05-11 08:41:42 +01:00
parent 1caf3ae674
commit 923c993e5a

View File

@@ -49,8 +49,10 @@ describe("UrbitSSEClient", () => {
const body = JSON.parse(callArgs.init?.body as string);
expect(body).toHaveLength(1);
expect(body[0]).toMatchObject({
expect(body[0]).toEqual({
id: 1,
action: "subscribe",
ship: "example",
app: "chat",
path: "/dm/~zod",
});
@@ -72,7 +74,10 @@ describe("UrbitSSEClient", () => {
expect(mockUrbitFetch).not.toHaveBeenCalled();
// But subscription should be queued
expect(client.subscriptions).toHaveLength(1);
expect(client.subscriptions[0]).toMatchObject({
expect(client.subscriptions[0]).toEqual({
id: 1,
action: "subscribe",
ship: "example",
app: "chat",
path: "/dm/~zod",
});