Skip to content

Commit 980550f

Browse files
committed
Update test case for getOrdinalNumber to clarify conditions for 'th' suffix
1 parent 388b82e commit 980550f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ test("should append 'th' for the exceptions 11, 12, and 13", () => {
3939
expect(getOrdinalNumber(111)).toEqual("111th");
4040
});
4141

42-
test("should append 'th' for all other numbers", () => {
42+
test("should append 'th' for numbers ending with 0, 4, 5, 6, 7, 8, or 9", () => {
4343
expect(getOrdinalNumber(4)).toEqual("4th");
4444
expect(getOrdinalNumber(10)).toEqual("10th");
4545
expect(getOrdinalNumber(35)).toEqual("35th");
4646
expect(getOrdinalNumber(99)).toEqual("99th");
47-
expect(getOrdinalNumber(100)).toEqual("100th");
47+
expect(getOrdinalNumber(100)).toEqual("100th");
48+
});

0 commit comments

Comments
 (0)