mirror of https://github.com/openclaw/openclaw.git
26 lines
758 B
TypeScript
26 lines
758 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveGoogleChatGroupRequireMention } from "./group-policy.js";
|
|
|
|
describe("googlechat group policy", () => {
|
|
it("uses generic channel group policy helpers", () => {
|
|
const cfg = {
|
|
channels: {
|
|
googlechat: {
|
|
groups: {
|
|
"spaces/AAA": {
|
|
requireMention: false,
|
|
},
|
|
"*": {
|
|
requireMention: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
// oxlint-disable-next-line typescript/no-explicit-any
|
|
} as any;
|
|
|
|
expect(resolveGoogleChatGroupRequireMention({ cfg, groupId: "spaces/AAA" })).toBe(false);
|
|
expect(resolveGoogleChatGroupRequireMention({ cfg, groupId: "spaces/BBB" })).toBe(true);
|
|
});
|
|
});
|