mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 22:40:20 +00:00
test: strengthen regression coverage and trim low-value checks
This commit is contained in:
@@ -48,6 +48,26 @@ describe("feishu directory (config-backed)", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("normalizes spaced provider-prefixed peer entries", async () => {
|
||||
resolveFeishuAccountMock.mockReturnValueOnce({
|
||||
configured: false,
|
||||
config: {
|
||||
allowFrom: [" feishu:user:ou_alice "],
|
||||
dms: {
|
||||
" lark:dm:ou_carla ": {},
|
||||
},
|
||||
groups: {},
|
||||
groupAllowFrom: [],
|
||||
},
|
||||
});
|
||||
|
||||
const peers = await listFeishuDirectoryPeers({ cfg });
|
||||
expect(peers).toEqual([
|
||||
{ kind: "user", id: "ou_alice" },
|
||||
{ kind: "user", id: "ou_carla" },
|
||||
]);
|
||||
});
|
||||
|
||||
it("merges groups map + groupAllowFrom into group entries", async () => {
|
||||
const groups = await listFeishuDirectoryGroups({ cfg });
|
||||
expect(groups).toEqual([
|
||||
|
||||
Reference in New Issue
Block a user