Skip to content

Commit b56500c

Browse files
committed
Added 5 more tests as requested.
1 parent cf1ca72 commit b56500c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎format-clock-edge-cases/timeConverter.test.js‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ test("can correctly convert time with hour being 00 to show as 12 am", function
3131
test("can correctly convert time with just after midnight to still show 12 am with minutes added", function () {
3232
assert.equal(formatAs12HourClock("00:01"), "12:01 am");
3333
});
34+
35+
test("last minute before 12 pm", function () {
36+
assert.equal(formatAs12HourClock("11:59"), "11:59 am");
37+
});
38+
test("noon is 12 pm", function () {
39+
assert.equal(formatAs12HourClock("12:00"), "12:00 pm");
40+
});
41+
test("first minute after noon", function () {
42+
assert.equal(formatAs12HourClock("12:01"), "12:01 pm");
43+
});
44+
test("first hour after noon is 1 pm", function () {
45+
assert.equal(formatAs12HourClock("13:00"), "01:00 pm");
46+
});
47+
test("last minute before midnight", function () {
48+
assert.equal(formatAs12HourClock("23:59"), "11:59 pm");
49+
});

0 commit comments

Comments
 (0)