mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 08:49:49 +00:00
test: tighten tlon sse subscription assertions
This commit is contained in:
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user