@@ -33,8 +33,8 @@ describe('Table component', () => {
3333 } ) ;
3434
3535 it ( 'should correctly modify row' , ( ) => {
36- let modify = ( name ) => {
37- return `Name: ${ name } `
36+ let modify = ( { value } ) => {
37+ return `Name: ${ value } `
3838 }
3939
4040 Test ( < Table rows = { [ { name : 'zach' } ] } modify = { { name : modify } } /> )
@@ -45,7 +45,7 @@ describe('Table component', () => {
4545 } )
4646
4747 it ( 'should correctly modify all rows' , ( ) => {
48- let modify = ( value ) => {
48+ let modify = ( { value} ) => {
4949 return `yo ${ value } `
5050 }
5151
@@ -58,11 +58,11 @@ describe('Table component', () => {
5858 } )
5959
6060 it ( 'should modify all rows and ignore individual modify ' , ( ) => {
61- let modify = ( value ) => {
61+ let modify = ( { value} ) => {
6262 return `yo ${ value } `
6363 }
64-
65- let modifyName = ( value ) => {
64+
65+ let modifyName = ( { value} ) => {
6666 return `Name: ${ value } `
6767 }
6868
@@ -74,5 +74,16 @@ describe('Table component', () => {
7474 } )
7575 } )
7676
77+ it ( 'should hide id row' , ( ) => {
78+ let modify = ( { hidden} ) => {
79+ expect ( hidden . id ) . to . be . equal ( 1 )
80+ }
81+ Test ( < Table rows = { [ { id : 1 , name : 'zach' } ] } hide = { [ 'id' ] } /> )
82+ . find ( 'td' )
83+ . element ( td => {
84+ expect ( td . props . children ) . to . be . equal ( 'zach' ) ;
85+ } )
86+ } ) ;
87+
7788 } ) ;
7889} ) ;
0 commit comments