Skip to content

Commit 93fb568

Browse files
committed
Add a missing test for 11-13th floor
1 parent 780bc1c commit 93fb568

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
@@ -31,6 +31,12 @@ test("should append 'rd' for numbers ending with 3, except those ending with 13"
3131
expect(getOrdinalNumber(123)).toEqual("123rd");
3232
});
3333

34+
test("should append 'th for special cases 11, 12, 13", () => {
35+
expect(getOrdinalNumber(11)).toEqual("11th");
36+
expect(getOrdinalNumber(12)).toEqual("12th");
37+
expect(getOrdinalNumber(13)).toEqual("13th");
38+
});
39+
3440
test("should append 'th' for the rest of the numbers", () => {
3541
expect(getOrdinalNumber(9)).toEqual("9th");
3642
expect(getOrdinalNumber(20)).toEqual("20th");

0 commit comments

Comments
 (0)