Skip to content

Commit f829a04

Browse files
committed
Clarified test descriptions for getOrdinalNumber
1 parent 8789a9f commit f829a04

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test("should return '4th' for 4", () => {
2727
expect(getOrdinalNumber(4)).toEqual("4th");
2828
});
2929

30-
test("should return '11th', '12th', '13th' for special cases", () => {
30+
test("should add 'th' for numbers ending in 11, 12, or 13", () => {
3131
expect(getOrdinalNumber(11)).toEqual("11th");
3232
expect(getOrdinalNumber(12)).toEqual("12th");
3333
expect(getOrdinalNumber(13)).toEqual("13th");
@@ -36,7 +36,7 @@ test("should return '11th', '12th', '13th' for special cases", () => {
3636
expect(getOrdinalNumber(113)).toEqual("113th");
3737
});
3838

39-
test("should return '21st', '22nd', '23rd'", () => {
39+
test("should add 'st', 'nd', or 'rd' for numbers ending in 1, 2, or 3 (except 11,13)", () => {
4040
expect(getOrdinalNumber(21)).toEqual("21st");
4141
expect(getOrdinalNumber(22)).toEqual("22nd");
4242
expect(getOrdinalNumber(23)).toEqual("23rd");
@@ -46,7 +46,6 @@ test("should return '21st', '22nd', '23rd'", () => {
4646
});
4747

4848
test("should return correct 'th' for numbers ending in 4-9 or 0", () => {
49-
expect(getOrdinalNumber(4)).toEqual("4th");
5049
expect(getOrdinalNumber(5)).toEqual("5th");
5150
expect(getOrdinalNumber(10)).toEqual("10th");
5251
expect(getOrdinalNumber(24)).toEqual("24th");

0 commit comments

Comments
 (0)