Skip to content

Commit 292dd0f

Browse files
committed
Added more test for getOrdinalNumber implementing
1 parent e9f9578 commit 292dd0f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sprint-3/2-practice-tdd/get-ordinal-number.test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,20 @@ test("should append 'nd' for number ending with 2 except those ending with 12",
2727
});
2828

2929
// Case 3: Numbers ending with 3 (but not 13)
30-
test("should append 'rd' for number anding with 3 expect those ending with 13", () => {
30+
test("should append 'rd' for number ending with 3, except those ending with 13", () => {
3131
expect(getOrdinalNumber(3)).toEqual("3rd");
3232
expect(getOrdinalNumber(33)).toEqual("33rd");
3333
expect(getOrdinalNumber(43)).toEqual("43rd");
3434
});
3535

36-
// Case 4: Number ending with 11,12, 13
37-
test("should append 'th' for number ending with 11, 12, 13", () => {
36+
// Case 4: Number ending with 11,12, or 13
37+
test("should append 'th' for number ending with 11, 12, or 13", () => {
3838
expect(getOrdinalNumber(11)).toEqual("11th");
3939
expect(getOrdinalNumber(12)).toEqual("12th");
4040
expect(getOrdinalNumber(13)).toEqual("13th");
41+
expect(getOrdinalNumber(111)).toEqual("111th");
42+
expect(getOrdinalNumber(112)).toEqual("112th");
43+
expect(getOrdinalNumber(113)).toEqual("113th");
4144
});
4245

4346
// Case 5: Numbers ending with 0, 4, 5, 6, 7, 8, or 9 (but not those ending with 11, 12, or 13)

0 commit comments

Comments
 (0)