Skip to content

Commit e0a7c74

Browse files
Implement rd suffix
1 parent e513388 commit e0a7c74

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
@@ -24,3 +24,9 @@ test("should append 'nd' for numbers ending with 2, except those ending with 12"
2424
expect(getOrdinalNumber(22)).toEqual("22nd");
2525
expect(getOrdinalNumber(112)).toEqual("112th");
2626
});
27+
28+
test("should append 'rd' for numbers ending with 3, except those ending with 13", () => {
29+
expect(getOrdinalNumber(3)).toEqual("3rd");
30+
expect(getOrdinalNumber(23)).toEqual("23rd");
31+
expect(getOrdinalNumber(113)).toEqual("113th");
32+
});

0 commit comments

Comments
 (0)