























@@ -82,9 +82,21 @@ describe("registerFeishuChatTools", () => {
8282data: { name: "group name", user_count: 3 },
8383});
8484const infoResult = await tool.execute("tc_1", { action: "info", chat_id: "oc_1" });
85-expect(infoResult.details).toEqual(
86-expect.objectContaining({ chat_id: "oc_1", name: "group name", user_count: 3 }),
87-);
85+expect(infoResult.details).toEqual({
86+chat_id: "oc_1",
87+name: "group name",
88+description: undefined,
89+owner_id: undefined,
90+tenant_key: undefined,
91+user_count: 3,
92+chat_mode: undefined,
93+chat_type: undefined,
94+join_message_visibility: undefined,
95+leave_message_visibility: undefined,
96+membership_approval: undefined,
97+moderation_permission: undefined,
98+avatar: undefined,
99+});
8810089101chatMembersGetMock.mockResolvedValueOnce({
90102code: 0,
@@ -95,12 +107,19 @@ describe("registerFeishuChatTools", () => {
95107},
96108});
97109const membersResult = await tool.execute("tc_2", { action: "members", chat_id: "oc_1" });
98-expect(membersResult.details).toEqual(
99-expect.objectContaining({
100-chat_id: "oc_1",
101-members: [expect.objectContaining({ member_id: "ou_1", name: "member1" })],
102-}),
103-);
110+expect(membersResult.details).toEqual({
111+chat_id: "oc_1",
112+has_more: false,
113+page_token: "",
114+members: [
115+{
116+member_id: "ou_1",
117+name: "member1",
118+tenant_key: undefined,
119+member_id_type: "open_id",
120+},
121+],
122+});
104123105124contactUserGetMock.mockResolvedValueOnce({
106125code: 0,
@@ -117,15 +136,35 @@ describe("registerFeishuChatTools", () => {
117136action: "member_info",
118137member_id: "ou_1",
119138});
120-expect(memberInfoResult.details).toEqual(
121-expect.objectContaining({
122-member_id: "ou_1",
123-open_id: "ou_1",
124-name: "member1",
125-email: "member1@example.com",
126-department_ids: ["od_1"],
127-}),
128-);
139+expect(memberInfoResult.details).toEqual({
140+member_id: "ou_1",
141+member_id_type: "open_id",
142+open_id: "ou_1",
143+user_id: undefined,
144+union_id: undefined,
145+name: "member1",
146+en_name: undefined,
147+nickname: undefined,
148+email: "member1@example.com",
149+enterprise_email: undefined,
150+mobile: undefined,
151+mobile_visible: undefined,
152+status: undefined,
153+avatar: undefined,
154+department_ids: ["od_1"],
155+department_path: undefined,
156+leader_user_id: undefined,
157+city: undefined,
158+country: undefined,
159+work_station: undefined,
160+join_time: undefined,
161+is_tenant_manager: undefined,
162+employee_no: undefined,
163+employee_type: undefined,
164+description: undefined,
165+job_title: undefined,
166+geo: undefined,
167+});
129168});
130169131170it("skips registration when chat tool is disabled", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。