mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 22:19:21 +00:00
32 lines
821 B
TypeScript
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);
|
|
});
|
|
});
|