Files
openclaw/extensions/googlechat/src/config-schema.test.ts
2026-05-03 14:54:35 -07:00

32 lines
821 B
TypeScript

import { describe, expect, it } from "vitest";
import { GoogleChatConfigSchema } from "../runtime-api.js";
describe("googlechat config schema", () => {
it("accepts serviceAccount refs", () => {
const result = GoogleChatConfigSchema.safeParse({
serviceAccountRef: {
source: "file",
provider: "filemain",
id: "/channels/googlechat/serviceAccount",
},
});
expect(result.success).toBe(true);
});
it("accepts the documented group config shape", () => {
const result = GoogleChatConfigSchema.safeParse({
groups: {
"spaces/AAAA": {
enabled: true,
requireMention: true,
users: ["users/1234567890"],
systemPrompt: "Short answers only.",
},
},
});
expect(result.success).toBe(true);
});
});