@@ -5,29 +5,15 @@ test("should return 11 for Ace of Spades", () => {
55 expect ( aceofSpades ) . toEqual ( 11 ) ;
66} ) ;
77
8- test ( "should return 5 for 5 of Hearts " , ( ) => {
9- const fiveofHearts = getCardValue ( "5♥" ) ;
10- expect ( fiveofHearts ) . toEqual ( 5 ) ;
8+ test ( "should return correct values for number cards " , ( ) => {
9+ expect ( getCardValue ( "5♥" ) ) . toEqual ( 5 ) ;
10+ expect ( getCardValue ( "10♦" ) ) . toEqual ( 10 ) ;
1111} ) ;
1212
13- test ( "should return 10 for 10 of Diamonds" , ( ) => {
14- const tenofDiamonds = getCardValue ( "10♦" ) ;
15- expect ( tenofDiamonds ) . toEqual ( 10 ) ;
16- } ) ;
17-
18- test ( "should return 10 for Jack of Clubs" , ( ) => {
19- const jackofClubs = getCardValue ( "J♣" ) ;
20- expect ( jackofClubs ) . toEqual ( 10 ) ;
21- } ) ;
22-
23- test ( "should return 10 for Queen of Hearts" , ( ) => {
24- const queenofHearts = getCardValue ( "Q♥" ) ;
25- expect ( queenofHearts ) . toEqual ( 10 ) ;
26- } ) ;
27-
28- test ( "should return 10 for King of Spades" , ( ) => {
29- const kingofSpades = getCardValue ( "K♠" ) ;
30- expect ( kingofSpades ) . toEqual ( 10 ) ;
13+ test ( "should return for face cards J, Q, K" , ( ) => {
14+ expect ( getCardValue ( "J♣" ) ) . toEqual ( 10 ) ;
15+ expect ( getCardValue ( "Q♦" ) ) . toEqual ( 10 ) ;
16+ expect ( getCardValue ( "K♠" ) ) . toEqual ( 10 ) ;
3117} ) ;
3218
3319test ( "throws an error or invalid card" , ( ) => {
0 commit comments