mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 05:41:46 +00:00
16 lines
726 B
TypeScript
16 lines
726 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { AgentDefaultsSchema } from "./zod-schema.agent-defaults.js";
|
|
import { SessionSchema } from "./zod-schema.session.js";
|
|
|
|
describe("typing mode schema reuse", () => {
|
|
it("accepts supported typingMode values for session and agent defaults", () => {
|
|
expect(() => SessionSchema.parse({ typingMode: "thinking" })).not.toThrow();
|
|
expect(() => AgentDefaultsSchema.parse({ typingMode: "message" })).not.toThrow();
|
|
});
|
|
|
|
it("rejects unsupported typingMode values for session and agent defaults", () => {
|
|
expect(() => SessionSchema.parse({ typingMode: "always" })).toThrow();
|
|
expect(() => AgentDefaultsSchema.parse({ typingMode: "soon" })).toThrow();
|
|
});
|
|
});
|