Files
local-cal/tests/event-dialog.test.tsx

17 lines
624 B
TypeScript

import { describe, expect, test } from "bun:test";
import { getEventFormValuesFromEvent } from "@/lib/event-form";
describe("EventDialog public modes", () => {
test("accepts AI-prefilled editable initial values through its public props", () => {
const initialValues = getEventFormValuesFromEvent({
title: "AI Draft",
start: "2026-04-09T10:00:00.000Z",
recurrenceRule: "FREQ=WEEKLY;INTERVAL=1;BYDAY=TH",
});
expect(initialValues.title).toBe("AI Draft");
expect(initialValues.start).toBe("2026-04-09T10:00:00.000Z");
expect(initialValues.recurrenceRule).toBe("FREQ=WEEKLY;INTERVAL=1;BYDAY=TH");
});
});