@@ -19,7 +19,7 @@ describe("sum()", () => {
1919 { input : [ 7958463 ] , expected : 7958463 } ,
2020 ] . forEach ( ( { input, expected } ) => {
2121 it ( `returns the sum for arrays with one number` , ( ) =>
22- expect ( sum ( input ) ) . toBeCloseTo ( expected ) ) ;
22+ expect ( sum ( input ) ) . toEqual ( expected ) ) ;
2323 } ) ;
2424
2525 [
@@ -28,7 +28,7 @@ describe("sum()", () => {
2828 { input : [ - 7958463 , - 100 , - 202 , - 6453 ] , expected : - 7965218 } ,
2929 ] . forEach ( ( { input, expected } ) =>
3030 it ( "returns the correct sum for array with only negative values" , ( ) =>
31- expect ( sum ( input ) ) . toBeCloseTo ( expected ) )
31+ expect ( sum ( input ) ) . toEqual ( expected ) )
3232 ) ;
3333
3434 [
@@ -37,7 +37,7 @@ describe("sum()", () => {
3737 { input : [ - 7958463 , - 100 , - 202 , - 6453 , 153 , 45621 ] , expected : - 7919444 } ,
3838 ] . forEach ( ( { input, expected } ) =>
3939 it ( "returns the correct sum for array containing negative numbers" , ( ) =>
40- expect ( sum ( input ) ) . toBeCloseTo ( expected ) )
40+ expect ( sum ( input ) ) . toEqual ( expected ) )
4141 ) ;
4242
4343 [
@@ -88,6 +88,6 @@ describe("sum()", () => {
8888 [ ( "apple" , null , undefined ) ] ,
8989 ] . forEach ( ( item ) =>
9090 it ( "returns 0 for arrays with only non-number values" , ( ) =>
91- expect ( sum ( item ) ) . toBeCloseTo ( 0 ) )
91+ expect ( sum ( item ) ) . toEqual ( 0 ) )
9292 ) ;
9393} ) ;
0 commit comments