File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -471,6 +471,28 @@ describe('Transition', () => {
471471 } )
472472
473473 describe ( 'findDOMNode' , ( ) => {
474+ it ( 'uses ReactDOM.findDOMNode by default' , done => {
475+ const expectDiv = sinon . spy ( node => expect ( node . nodeName ) . toEqual ( 'DIV' ) ) ;
476+ const handleExited = ( ) => {
477+ expect ( expectDiv . called ) . toBe ( true ) ;
478+
479+ done ( ) ;
480+ }
481+
482+ const wrapper = mount (
483+ < Transition
484+ in
485+ timeout = { 10 }
486+ onExiting = { expectDiv }
487+ onExited = { handleExited }
488+ >
489+ { status => < div > < span > { status } </ span > </ div > }
490+ </ Transition >
491+ ) ;
492+
493+ wrapper . setProps ( { in : false } ) ;
494+ } )
495+
474496 it ( 'can receive a custom findDOMNode method' , done => {
475497 class StrictModeTransition extends React . Component {
476498 constructor ( props ) {
You can’t perform that action at this time.
0 commit comments