Skip to content

Commit 46aee35

Browse files
committed
Add tests for getCardValue with "1♠" and empty string arguments to ensure proper handling of invalid card ranks
1 parent df7ccfb commit 46aee35

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest/3-get-card-value.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ test("should return 11 for ace card", () => {
2828

2929
// Case 5: Handle Invalid Cards:
3030
test("should return invalid card rank for random numbers", () => {
31-
const invalidRandomCard = getCardValue("85♠");
32-
expect(invalidRandomCard).toEqual("Invalid card rank.");
31+
expect(getCardValue("85♠")).toEqual("Invalid card rank.");
32+
expect(getCardValue("1♠")).toEqual("Invalid card rank.");
33+
expect(getCardValue("")).toEqual("Invalid card rank.");
3334
});

0 commit comments

Comments
 (0)