Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

test: 验证房间已读接口兼容

Zhehui Bi0a09f5c25d1f
diff --git a/server/fork-api.e2e.test.ts b/server/fork-api.e2e.test.ts
index d8f3b488eb..bae2017a2d 100644
--- a/server/fork-api.e2e.test.ts
+++ b/server/fork-api.e2e.test.ts
@@ -66,6 +66,7 @@ it("forks bot and room conversations through the public API and keeps a fork aft
const roomFork = await api("POST", `/api/groups/${room.id}/tasks/${roomThreadId}/forks`, { messageId: roomAnchor.id });
expect(roomFork.status).toBe(201);
expect(roomFork.body.task.origin).toEqual({ threadId: roomThreadId, messageId: roomAnchor.id });
+ expect((await api("POST", `/api/groups/${room.id}/read`)).status).toBe(200);
expect((await api("POST", `/api/groups/${room.id}/read`, { threadId: roomFork.body.task.threadId })).status).toBe(200);
expect((await api("DELETE", `/api/groups/${room.id}/tasks/${roomThreadId}`)).status).toBe(200);
expect((await messages(roomFork.body.task.threadId)).some((message) => message.id === roomAnchor.id)).toBe(true);