@@ -21,7 +21,7 @@ describe("Array", () => {
2121
2222 it ( "renders empty array as expected" , ( ) => {
2323 const object = [ ] ;
24- const renderRep = props => shallow ( Rep ( Object . assign ( { object } , props ) ) ) ;
24+ const renderRep = props => shallow ( Rep ( { object, ... props } ) ) ;
2525
2626 const defaultOutput = "[]" ;
2727 expect ( renderRep ( { mode : undefined } ) . text ( ) ) . toBe ( defaultOutput ) ;
@@ -32,7 +32,7 @@ describe("Array", () => {
3232
3333 it ( "renders basic array as expected" , ( ) => {
3434 const object = [ 1 , "foo" , { } ] ;
35- const renderRep = props => shallow ( Rep ( Object . assign ( { object } , props ) ) ) ;
35+ const renderRep = props => shallow ( Rep ( { object, ... props } ) ) ;
3636
3737 const defaultOutput = `[ 1, "foo", {} ]` ;
3838 expect ( renderRep ( { mode : undefined } ) . text ( ) ) . toBe ( defaultOutput ) ;
@@ -43,7 +43,7 @@ describe("Array", () => {
4343
4444 it ( "renders array with more than SHORT mode maximum props as expected" , ( ) => {
4545 const object = Array ( maxLengthMap . get ( MODE . SHORT ) + 1 ) . fill ( "foo" ) ;
46- const renderRep = props => shallow ( Rep ( Object . assign ( { object } , props ) ) ) ;
46+ const renderRep = props => shallow ( Rep ( { object, ... props } ) ) ;
4747
4848 const defaultShortOutput =
4949 `[ ${ Array ( maxLengthMap . get ( MODE . SHORT ) ) . fill ( "\"foo\"" ) . join ( ", " ) } , … ]` ;
@@ -57,7 +57,7 @@ describe("Array", () => {
5757
5858 it ( "renders array with more than LONG mode maximum props as expected" , ( ) => {
5959 const object = Array ( maxLengthMap . get ( MODE . LONG ) + 1 ) . fill ( "foo" ) ;
60- const renderRep = props => shallow ( Rep ( Object . assign ( { object } , props ) ) ) ;
60+ const renderRep = props => shallow ( Rep ( { object, ... props } ) ) ;
6161
6262 const defaultShortOutput =
6363 `[ ${ Array ( maxLengthMap . get ( MODE . SHORT ) ) . fill ( "\"foo\"" ) . join ( ", " ) } , … ]` ;
@@ -71,7 +71,7 @@ describe("Array", () => {
7171 it ( "renders recursive array as expected" , ( ) => {
7272 const object = [ 1 ] ;
7373 object . push ( object ) ;
74- const renderRep = props => shallow ( Rep ( Object . assign ( { object } , props ) ) ) ;
74+ const renderRep = props => shallow ( Rep ( { object, ... props } ) ) ;
7575
7676 const defaultOutput = "[ 1, […] ]" ;
7777 expect ( renderRep ( { mode : undefined } ) . text ( ) ) . toBe ( defaultOutput ) ;
@@ -87,7 +87,7 @@ describe("Array", () => {
8787 p3 : "s3" ,
8888 p4 : "s4"
8989 } ] ;
90- const renderRep = props => shallow ( Rep ( Object . assign ( { object } , props ) ) ) ;
90+ const renderRep = props => shallow ( Rep ( { object, ... props } ) ) ;
9191
9292 const defaultOutput = "[ {…} ]" ;
9393 expect ( renderRep ( { mode : undefined } ) . text ( ) ) . toBe ( defaultOutput ) ;
0 commit comments