cronofy-elements
Advanced tools
Comparing version 1.29.1 to 1.29.2
{ | ||
"name": "cronofy-elements", | ||
"version": "1.29.1", | ||
"version": "1.29.2", | ||
"description": "Fast track scheduling with Cronofy's embeddable UI Elements", | ||
@@ -5,0 +5,0 @@ "main": "build/npm/CronofyElements.js", |
@@ -54,2 +54,5 @@ import moment from "moment-timezone"; | ||
} | ||
if (endTime.time === "00:00") { | ||
endTime.time = "24:00"; | ||
} | ||
@@ -56,0 +59,0 @@ if (startTime.time > endTime.time) { |
@@ -643,2 +643,22 @@ import moment from "moment-timezone"; | ||
it("converts midnight end_time to 24:00", () => { | ||
const input = { | ||
data_center: "DATA_CENTER", | ||
availability_query: { | ||
query_periods: generic_query_periods, | ||
required_duration: "TEST" | ||
}, | ||
target_id: "TARGET", | ||
element_token: "TOKEN", | ||
config: { | ||
start_time: "08:00", | ||
end_time: "00:00", | ||
interval: 60 | ||
} | ||
}; | ||
const result = parseAvailabilityViewerOptions(input); | ||
expect(result.config.end_time).toEqual("24:00"); | ||
}); | ||
it("correctly parses grid times", () => { | ||
@@ -645,0 +665,0 @@ const simpleTime = parseGridTime("08:00"); |
Sorry, the diff of this file is too big to display
2915892
27507