@@ -52,7 +52,9 @@ public void ShouldTransformJsx()
5252
5353 _environment . Verify ( x => x . ExecuteWithLargerStackIfRequired < string > (
5454 "ReactNET_transform" ,
55- "<div>Hello World</div>"
55+ "<div>Hello World</div>" ,
56+ It . IsAny < string > ( ) ,
57+ "unknown" // file name
5658 ) ) ;
5759 }
5860
@@ -61,7 +63,9 @@ public void ShouldWrapExceptionsInJsxExeption()
6163 {
6264 _environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < string > (
6365 "ReactNET_transform" ,
64- "<div>Hello World</div>"
66+ "<div>Hello World</div>" ,
67+ It . IsAny < string > ( ) ,
68+ "unknown" // file name
6569 ) ) . Throws ( new Exception ( "Something broke..." ) ) ;
6670
6771 const string input = "<div>Hello World</div>" ;
@@ -102,7 +106,9 @@ public void ShouldTransformJsxIfFileCacheHashInvalid()
102106 _fileCacheHash . Setup ( x => x . ValidateHash ( It . IsAny < string > ( ) , It . IsAny < string > ( ) ) ) . Returns ( false ) ;
103107 _environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < JavaScriptWithSourceMap > (
104108 "ReactNET_transform_sourcemap" ,
105- It . IsAny < string > ( )
109+ It . IsAny < string > ( ) ,
110+ It . IsAny < string > ( ) , // Babel config
111+ "foo.jsx" // File name
106112 ) ) . Returns ( new JavaScriptWithSourceMap { Code = "React.DOM.div('Hello World')" } ) ;
107113
108114 var result = _jsxTransformer . TransformJsxFile ( "foo.jsx" ) ;
@@ -117,7 +123,9 @@ public void ShouldTransformJsxIfNoCache()
117123 _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "<div>Hello World</div>" ) ;
118124 _environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < JavaScriptWithSourceMap > (
119125 "ReactNET_transform_sourcemap" ,
120- It . IsAny < string > ( )
126+ It . IsAny < string > ( ) ,
127+ It . IsAny < string > ( ) , // Babel config
128+ "foo.jsx" // File name
121129 ) ) . Returns ( new JavaScriptWithSourceMap { Code = "React.DOM.div('Hello World')" } ) ;
122130
123131 var result = _jsxTransformer . TransformJsxFile ( "foo.jsx" ) ;
@@ -130,7 +138,9 @@ public void ShouldSaveTransformationResult()
130138 _fileSystem . Setup ( x => x . ReadAsString ( "foo.jsx" ) ) . Returns ( "<div>Hello World</div>" ) ;
131139 _environment . Setup ( x => x . ExecuteWithLargerStackIfRequired < JavaScriptWithSourceMap > (
132140 "ReactNET_transform_sourcemap" ,
133- It . IsAny < string > ( )
141+ It . IsAny < string > ( ) ,
142+ It . IsAny < string > ( ) , // Babel config
143+ "foo.jsx" // File name
134144 ) ) . Returns ( new JavaScriptWithSourceMap { Code = "React.DOM.div('Hello World')" } ) ;
135145
136146 string result = null ;
@@ -145,7 +155,7 @@ public void ShouldSaveTransformationResult()
145155
146156 private void SetUpEmptyCache ( )
147157 {
148- _cache . Setup ( x => x . Get < JavaScriptWithSourceMap > ( "JSX_v2_foo .jsx" , null ) ) . Returns ( ( JavaScriptWithSourceMap ) null ) ;
158+ _cache . Setup ( x => x . Get < JavaScriptWithSourceMap > ( "JSX_v3_foo .jsx" , null ) ) . Returns ( ( JavaScriptWithSourceMap ) null ) ;
149159 }
150160 }
151161}
0 commit comments