Skip to content

Commit 8f42d71

Browse files
committed
Clarify 'th' suffix test description
1 parent b136e34 commit 8f42d71

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ test("should append 'rd' for numbers ending with 3, except those ending with 13"
3333
expect(getOrdinalNumber(503)).toEqual("503rd");
3434
});
3535

36-
// Case 4: All other numbers → 'th'
37-
test("should append 'th' for all other numbers", () => {
36+
// Case 4: Numbers that should use the 'th' suffix
37+
test("should append 'th' for numbers ending in 11, 12, 13 or whose last digit is not 1, 2, or 3", () => {
3838
expect(getOrdinalNumber(4)).toEqual("4th");
3939
expect(getOrdinalNumber(10)).toEqual("10th");
4040
expect(getOrdinalNumber(11)).toEqual("11th"); // special case
@@ -43,3 +43,4 @@ test("should append 'th' for all other numbers", () => {
4343
expect(getOrdinalNumber(100)).toEqual("100th");
4444
});
4545

46+

0 commit comments

Comments
 (0)