File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -923,6 +923,7 @@ describe('Select.Basic', () => {
923923 const onCompositionEnd = jest . fn ( ) ;
924924 const textareaRef = jest . fn ( ) ;
925925 const mouseDownPreventDefault = jest . fn ( ) ;
926+ const onPaste = jest . fn ( ) ;
926927 const { container } = render (
927928 < Select
928929 mode = "combobox"
@@ -933,6 +934,7 @@ describe('Select.Basic', () => {
933934 onMouseDown = { onMouseDown }
934935 onCompositionStart = { onCompositionStart }
935936 onCompositionEnd = { onCompositionEnd }
937+ onPaste = { onPaste }
936938 ref = { textareaRef }
937939 className = "custom-input"
938940 />
@@ -964,6 +966,13 @@ describe('Select.Basic', () => {
964966 expect ( textareaRef ) . toHaveBeenCalled ( ) ;
965967 expect ( onCompositionStart ) . toHaveBeenCalled ( ) ;
966968 expect ( onCompositionEnd ) . toHaveBeenCalled ( ) ;
969+
970+ fireEvent . paste ( textareaEle , {
971+ target : { value : 'hi' } ,
972+ clipboardData : { getData : ( ) => 'hi' } ,
973+ } ) ;
974+ expect ( onPaste ) . toHaveBeenCalled ( ) ;
975+ expect ( textareaEle . value ) . toEqual ( 'hi' ) ;
967976 } ) ;
968977
969978 it ( 'not override customize props' , ( ) => {
You can’t perform that action at this time.
0 commit comments