File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Sprint-3/1-implement-and-rewrite-tests/implement Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,23 @@ assertEquals(getCardValue("A♠"), 11);
4848assertEquals ( getCardValue ( "2♥" ) , 2 ) ;
4949assertEquals ( getCardValue ( "10♥" ) , 10 ) ;
5050assertEquals ( getCardValue ( "Q♦" ) , 10 ) ;
51- assertEquals ( getCardValue ( "♦Q" ) , "Invalid card" ) ;
52- assertEquals ( getCardValue ( "11♦" ) , "Invalid card" ) ;
53-
5451// Handling invalid cards
5552try {
5653 getCardValue ( "invalid" ) ;
5754
5855 // This line will not be reached if an error is thrown as expected
5956 console . error ( "Error was not thrown for invalid card" ) ;
6057} catch ( e ) { }
58+ try {
59+ getCardValue ( "♦Q" ) ;
60+
61+ // This line will not be reached if an error is thrown as expected
62+ console . error ( "Error was not thrown for invalid card" ) ;
63+ } catch ( e ) { }
64+ try {
65+ getCardValue ( "11♦" ) ;
6166
67+ // This line will not be reached if an error is thrown as expected
68+ console . error ( "Error was not thrown for invalid card" ) ;
69+ } catch ( e ) { }
6270// What other invalid card cases can you think of?
You can’t perform that action at this time.
0 commit comments