@@ -42,15 +42,15 @@ public void RenderHtmlShouldCallRenderComponent()
4242 } ;
4343 component . RenderHtml ( ) ;
4444
45- environment . Verify ( x => x . Execute < string > ( @"React.renderToString(Foo( {""hello"":""World""}))" ) ) ;
45+ environment . Verify ( x => x . Execute < string > ( @"React.renderToString(React.createElement(Foo, {""hello"":""World""}))" ) ) ;
4646 }
4747
4848 [ Test ]
4949 public void RenderHtmlShouldWrapComponentInDiv ( )
5050 {
5151 var environment = new Mock < IReactEnvironment > ( ) ;
5252 environment . Setup ( x => x . Execute < bool > ( "typeof Foo !== 'undefined'" ) ) . Returns ( true ) ;
53- environment . Setup ( x => x . Execute < string > ( @"React.renderToString(Foo( {""hello"":""World""}))" ) )
53+ environment . Setup ( x => x . Execute < string > ( @"React.renderToString(React.createElement(Foo, {""hello"":""World""}))" ) )
5454 . Returns ( "[HTML]" ) ;
5555 var config = new Mock < IReactSiteConfiguration > ( ) ;
5656
@@ -69,7 +69,7 @@ public void RenderHtmlShouldWrapComponentInCustomElement()
6969 var config = new Mock < IReactSiteConfiguration > ( ) ;
7070 var environment = new Mock < IReactEnvironment > ( ) ;
7171 environment . Setup ( x => x . Execute < bool > ( "typeof Foo !== 'undefined'" ) ) . Returns ( true ) ;
72- environment . Setup ( x => x . Execute < string > ( @"React.renderToString(Foo( {""hello"":""World""}))" ) )
72+ environment . Setup ( x => x . Execute < string > ( @"React.renderToString(React.createElement(Foo, {""hello"":""World""}))" ) )
7373 . Returns ( "[HTML]" ) ;
7474
7575 var component = new ReactComponent ( environment . Object , config . Object , "Foo" , "container" )
@@ -95,7 +95,7 @@ public void RenderJavaScriptShouldCallRenderComponent()
9595 var result = component . RenderJavaScript ( ) ;
9696
9797 Assert . AreEqual (
98- @"React.render(Foo( {""hello"":""World""}), document.getElementById(""container""))" ,
98+ @"React.render(React.createElement(Foo, {""hello"":""World""}), document.getElementById(""container""))" ,
9999 result
100100 ) ;
101101 }
0 commit comments