Skip to content

Commit fdc1b1a

Browse files
author
Payman IB
committed
Fix test case description for numbers ending in 1 and remove redundant tests for 4 and 11
1 parent 354b5ac commit fdc1b1a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const getOrdinalNumber = require("./get-ordinal-number");
88
// When the number is 1,
99
// Then the function should return "1st"
1010

11-
test("append 'nd' to numbers ending in 1, except those ending in 11", () => {
11+
test("append 'st' to numbers ending in 1, except those ending in 11", () => {
1212
expect(getOrdinalNumber(1)).toEqual("1st");
1313
expect( getOrdinalNumber(21) ).toEqual("21st");
1414
expect( getOrdinalNumber(131) ).toEqual("131st");
@@ -24,16 +24,8 @@ test("append 'rd' to numbers ending in 3, except those ending in 13", () => {
2424
expect( getOrdinalNumber(33) ).toEqual("33rd");
2525
expect( getOrdinalNumber(133) ).toEqual("133rd");
2626
});
27-
test("append 'th' to numbers ending in 4", () => {
28-
expect(getOrdinalNumber(4)).toEqual("4th");
29-
expect( getOrdinalNumber(24) ).toEqual("24th");
30-
expect( getOrdinalNumber(134) ).toEqual("134th");
31-
});
32-
test("should return '11th' for 11", () => {
33-
expect(getOrdinalNumber(11)).toEqual("11th");
34-
});
3527
test("append 'th' to numbers which are not ending in 1, 2, 3", () => {
3628
expect(getOrdinalNumber(5)).toEqual("5th");
37-
expect( getOrdinalNumber(29) ).toEqual("29th");
29+
expect( getOrdinalNumber(24) ).toEqual("24th");
3830
expect( getOrdinalNumber(138) ).toEqual("138th");
3931
});

0 commit comments

Comments
 (0)