File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -29,15 +29,23 @@ describe('composeProps', () => {
2929 const aChange = jest . fn ( ) ;
3030 const aBlur = jest . fn ( ) ;
3131 const bChange = jest . fn ( ) ;
32+ const bDemo = jest . fn ( ) ;
3233 const sourceProps = { value : '11' , onChange : aChange , onBlur : aBlur } ;
33- const patchProps = { onChange : bChange , placeholder : 'x' } ;
34+ const patchProps = { onChange : bChange , onDemo : bDemo , placeholder : 'x' } ;
3435
3536 const props = composeProps ( sourceProps , patchProps ) ;
3637 props . onChange ( ) ;
3738 props . onBlur ( ) ;
39+ props . onDemo ( ) ;
3840 expect ( aChange ) . toHaveBeenCalled ( ) ;
3941 expect ( aBlur ) . toHaveBeenCalled ( ) ;
4042 expect ( bChange ) . toHaveBeenCalled ( ) ;
41- expect ( Object . keys ( props ) ) . toEqual ( [ 'value' , 'onChange' , 'onBlur' ] ) ;
43+ expect ( bDemo ) . toHaveBeenCalled ( ) ;
44+ expect ( Object . keys ( props ) ) . toEqual ( [
45+ 'value' ,
46+ 'onChange' ,
47+ 'onBlur' ,
48+ 'onDemo' ,
49+ ] ) ;
4250 } ) ;
4351} ) ;
You can’t perform that action at this time.
0 commit comments