test: remove redundant datetimepicker passthrough case

This commit is contained in:
Peter Steinberger
2026-02-16 07:47:36 +00:00
parent 993a5e63a1
commit e86647889c

View File

@@ -10,7 +10,6 @@ import {
messageAction,
uriAction,
postbackAction,
datetimePickerAction,
} from "./template-messages.js";
describe("messageAction", () => {
@@ -59,22 +58,6 @@ describe("postbackAction", () => {
});
});
describe("datetimePickerAction", () => {
it("includes min/max/initial when provided", () => {
const action = datetimePickerAction("Pick", "data", "datetime", {
initial: "2024-01-01T12:00",
min: "2024-01-01T00:00",
max: "2024-12-31T23:59",
});
expect(action.label).toBe("Pick");
expect((action as { mode: string }).mode).toBe("datetime");
expect((action as { initial: string }).initial).toBe("2024-01-01T12:00");
expect((action as { min: string }).min).toBe("2024-01-01T00:00");
expect((action as { max: string }).max).toBe("2024-12-31T23:59");
});
});
describe("createConfirmTemplate", () => {
it("truncates text to 240 characters", () => {
const longText = "x".repeat(300);