Skip to content

Commit ea944a1

Browse files
authored
3-get-card-value.test.js
1 parent 874c5ca commit ea944a1

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,6 @@ test("should return 11 for Ace of Spades", () => {
88
});
99

1010
// Case 2: Handle Number Cards (2-10):
11-
test("should return 7 for 7 of Hearts", () => {
12-
const sevenOfHearts = getCardValue("7♥");
13-
expect(sevenOfHearts).toEqual(7);
14-
});
1511
// Case 3: Handle Face Cards (J, Q, K):
16-
test("should return 10 for Jack of Diamonds", () => {
17-
const jackOfDiamonds = getCardValue("J♦");
18-
expect(jackOfDiamonds).toEqual(10);
19-
});
20-
21-
test("should return 10 for Queen of Clubs", () => {
22-
const queenOfClubs = getCardValue("Q♣");
23-
expect(queenOfClubs).toEqual(10);
24-
});
25-
26-
test("should return 10 for King of Spades", () => {
27-
const kingOfSpades = getCardValue("K♠");
28-
expect(kingOfSpades).toEqual(10);
29-
});
30-
3112
// Case 4: Handle Ace (A):
32-
test("should return 11 for Ace of Diamonds", () => {
33-
const aceOfDiamonds = getCardValue("A♦");
34-
expect(aceOfDiamonds).toEqual(11);
35-
});
3613
// Case 5: Handle Invalid Cards:
37-
test("should return null for invalid card '1X'", () => {
38-
const invalidCard1 = getCardValue("1X");
39-
expect(invalidCard1).toBe("Invalid card rank");
40-
});
41-
test("should return null for invalid card '11H'", () => {
42-
const invalidCard2 = getCardValue("11H");
43-
expect(invalidCard2).toBe("Invalid card rank");
44-
});
45-

0 commit comments

Comments
 (0)