Skip to content

Commit 2a83c2f

Browse files
committed
implement function for getCardValue
1 parent ff05213 commit 2a83c2f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ function assertEquals(actualOutput, targetOutput) {
6666

6767
// TODO: Write tests to cover all outcomes, including throwing errors for invalid cards.
6868
// Examples:
69-
assertEquals(getCardValue("9♠"), 9);
70-
assertEquals(getCardValue("A♥"), 11);
71-
assertEquals(getCardValue("J♣"), 10);
72-
assertEquals(getCardValue("Q♦"), 10);
73-
assertEquals(getCardValue("K♠"), 10);
74-
assertEquals(getCardValue("10♥"), 10);
75-
assertEquals(getCardValue("2♦"), 2);
69+
assertEquals(getCardValue("9♠"), 9); // should return 9 for the 9 of spades
70+
assertEquals(getCardValue("A♥"), 11); // should return 11 for the ace of hearts
71+
assertEquals(getCardValue("J♣"), 10); // should return 10 for the jack of clubs
72+
assertEquals(getCardValue("Q♦"), 10); // should return 10 for the queen of diamonds
73+
assertEquals(getCardValue("K♠"), 10); // should return 10 for the king of spades
74+
assertEquals(getCardValue("10♥"), 10); // should return 10 for the 10 of hearts
75+
assertEquals(getCardValue("2♦"), 2); // should return 2 for the 2 of diamonds
7676

7777

7878
// Handling invalid cards

0 commit comments

Comments
 (0)