Files
better-auth/docs/lib/ai-chat/step.test.ts
T
2026-08-10 15:11:39 +00:00

15 lines
415 B
TypeScript

import { describe, expect, it } from "vitest";
import { prepareChatStep } from "./step";
describe("prepareChatStep", () => {
it("requires a tool call before the assistant can answer", () => {
expect(prepareChatStep({ stepNumber: 0 })).toEqual({
toolChoice: "required",
});
});
it("lets the assistant answer after using a tool", () => {
expect(prepareChatStep({ stepNumber: 1 })).toEqual({});
});
});