Skip to content

Commit ce94896

Browse files
committed
added boundary cases
1 parent 4092ead commit ce94896

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test("correctly convert time after 12:00", function () {
66
assert.equal(formatAs12HourClock("23:00"), "11:00 pm");
77
});
88

9-
test("can correctly convert morning time", function () {
9+
test("can convert morning time from 08:00 to 08:00 am", function () {
1010
assert.equal(formatAs12HourClock("08:00"), "08:00 am");
1111
});
1212

@@ -25,3 +25,11 @@ test("correctly convert time after 12:00 ", function () {
2525
test("correctly convert time after 12:00 ", function () {
2626
assert.equal(formatAs12HourClock("19:00"), "07:00 pm");
2727
});
28+
29+
test("converts 23:59 to 11:59 ", function () {
30+
assert.equal(formatAs12HourClock("23:59"), "11:59 pm");
31+
});
32+
33+
test("converts 12:01 to 12:01 ", function () {
34+
assert.equal(formatAs12HourClock("12:01"), "12:01 pm");
35+
});

0 commit comments

Comments
 (0)