mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 11:24:57 -05:00
15 lines
415 B
TypeScript
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({});
|
|
});
|
|
});
|