4fa4f13558
Co-authored-by: iamlukethedev <iamlukethedev@users.noreply.github.com>
20 lines
514 B
TypeScript
20 lines
514 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { buildAgentInstruction } from "@/lib/text/message-extract";
|
|
|
|
describe("buildAgentInstruction", () => {
|
|
it("returns trimmed message for normal prompts", () => {
|
|
const message = buildAgentInstruction({
|
|
message: " Ship it ",
|
|
});
|
|
expect(message).toBe("Ship it");
|
|
});
|
|
|
|
it("returns command messages untouched", () => {
|
|
const message = buildAgentInstruction({
|
|
message: "/help",
|
|
});
|
|
expect(message).toBe("/help");
|
|
});
|
|
});
|