Skip to content

Commit e84da29

Browse files
committed
Completed the incomplete description and added a test for multiple values such as boundr values 2 and 10 in line 12-17
1 parent 6041f59 commit e84da29

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

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

1010
// Case 2: Handle Number Cards (2-10):
11-
test("should number cards for (2-10)", () => {
12-
const aceofSpades = getCardValue("6♠");
13-
expect(aceofSpades).toEqual(6);
11+
test("should return number cards for (2-10)", () => {
12+
const twoOfSpades = getCardValue("2♠");
13+
expect(twoOfSpades).toEqual(2);
14+
const sixOfHearts = getCardValue("6♥");
15+
expect(sixOfHearts).toEqual(6);
16+
const tenOfDiamonds = getCardValue("10♦");
17+
expect(tenOfDiamonds).toEqual(10);
1418
});
1519

1620
// Case 3: Handle Face Cards (J, Q, K):
@@ -29,3 +33,4 @@ test("should throw an error for invalid cards", () => {
2933
});
3034
// Sprint-3 rewrite-tests-with-jest/2-get-card-value.test.js. rewrote tests using jest
3135
// Few modifications done.
36+
// Completed incomplete description and added a test for multiple values such as boundr values 2 and 10 in line 12-17

0 commit comments

Comments
 (0)