Skip to content

Commit f08ec15

Browse files
implented tests for ordinal numbers 2nd and 3rd
1 parent f3f8b47 commit f08ec15

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,18 @@ const getOrdinalNumber = require("./get-ordinal-number");
1111
test("should return '1st' for 1", () => {
1212
expect(getOrdinalNumber(1)).toEqual("1st");
1313
});
14+
// Case 2: Identify the ordinal number for 2
15+
// When the number is 2,
16+
// The function should then return "2nd".
17+
18+
test("Should return `2nd` for 2", () => {
19+
expect(getOrdinalNumber(2)).toEqual("2nd");
20+
});
21+
22+
// Case 3: Identify the ordinal number for 3
23+
// When the number is 3,
24+
// The Function should the return "3rd"
25+
26+
test("Should return `3rd` for 3", () => {
27+
expect(getOrdinalNumber(3)).toEqual("3rd");
28+
});

0 commit comments

Comments
 (0)