Skip to content

Commit 3a89cc4

Browse files
Adding jest test case for numbers ending in three
1 parent 4377262 commit 3a89cc4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ test("should append 'st' for numbers ending with 1, except those ending with 11"
2525
test("appends 'nd' for numbers ending in 2 except 12", () => {
2626
expect(getOrdinalNumber(2)).toEqual("2nd");
2727
expect(getOrdinalNumber(22)).toEqual("22nd");
28+
});
29+
30+
// Case 3: Numbers ending in 3.
31+
test("appends 'rd' for numbers ending in 3 except 13", () => {
32+
expect(getOrdinalNumber(3)).toEqual("3rd");
33+
expect(getOrdinalNumber(23)).toEqual("23rd");
2834
});

0 commit comments

Comments
 (0)