File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Sprint-3/1-implement-and-rewrite-tests/rewrite-tests-with-jest Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,29 @@ test(`Should return 10 when given an K♠`, () => {
2424 expect ( getCardValue ( "K♠" ) ) . toEqual ( 10 ) ;
2525} ) ;
2626test ( `Should throw Error when given an ♦Q` , ( ) => {
27- expect ( function ( ) { getCardValue ( "♦Q" ) ; } ) . toThrow ( "Invalid card" ) ;
27+ expect ( function ( ) {
28+ getCardValue ( "♦Q" ) ;
29+ } ) . toThrow ( "Invalid card" ) ;
2830} ) ;
2931test ( `Should throw Error when given an 11♦` , ( ) => {
30- expect ( function ( ) { getCardValue ( "11♦" ) } ) . toThrow ( "Invalid card" ) ;
32+ expect ( function ( ) {
33+ getCardValue ( "11♦" ) ;
34+ } ) . toThrow ( "Invalid card" ) ;
3135} ) ;
3236test ( `Should throw Error when given an AX` , ( ) => {
33- expect ( function ( ) { getCardValue ( "AX" ) } ) . toThrow ( "Invalid card" ) ;
37+ expect ( function ( ) {
38+ getCardValue ( "AX" ) ;
39+ } ) . toThrow ( "Invalid card" ) ;
3440} ) ;
3541test ( `Should throw Error when given an KX` , ( ) => {
36- expect ( function ( ) { getCardValue ( "KX" ) } ) . toThrow ( "Invalid card" ) ;
42+ expect ( function ( ) {
43+ getCardValue ( "KX" ) ;
44+ } ) . toThrow ( "Invalid card" ) ;
3745} ) ;
3846test ( `Should throw Error when given an 5X` , ( ) => {
39- expect ( function ( ) { getCardValue ( "5X" ) } ) . toThrow ( "Invalid card" ) ;
47+ expect ( function ( ) {
48+ getCardValue ( "5X" ) ;
49+ } ) . toThrow ( "Invalid card" ) ;
4050} ) ;
4151
4252
You can’t perform that action at this time.
0 commit comments