Skip to content

Commit 5ad739a

Browse files
committed
add test for ordinal suffix 'th' for numbers ending with 0, 4-9, and 11-13
1 parent 044c4bf commit 5ad739a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎practice-tdd/get-ordinal-number.test.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ test("should append 'rd' for numbers ending with 3, except those ending with 13"
3030
expect(getOrdinalNumber(33)).toEqual("33rd");
3131
expect(getOrdinalNumber(143)).toEqual("143rd");
3232
});
33+
34+
test("should append 'th' for numbers ending with [0][4-9] and [11-13]", () => {
35+
expect(getOrdinalNumber(111)).toEqual("111th");
36+
expect(getOrdinalNumber(120)).toEqual("120th");
37+
expect(getOrdinalNumber(134)).toEqual("134th");
38+
});

0 commit comments

Comments
 (0)