File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
test/JavaScriptEngineSwitcher.Tests/ChakraCore Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 1- namespace JavaScriptEngineSwitcher . Tests . ChakraCore
1+ using System ;
2+ using Xunit ;
3+
4+ namespace JavaScriptEngineSwitcher . Tests . ChakraCore
25{
36 public class InteropTests : InteropTestsBase
47 {
58 protected override string EngineName
69 {
710 get { return "ChakraCoreJsEngine" ; }
811 }
12+
13+ [ Fact ]
14+ public void EmbeddedInstanceOfDelegateHasFunctionPrototype ( )
15+ {
16+ // Arrange
17+ var someFunc = new Func < int > ( ( ) => 42 ) ;
18+
19+ const string input = "Object.getPrototypeOf(embeddedFunc) === Function.prototype" ;
20+
21+ // Act
22+ bool output ;
23+
24+ using ( var jsEngine = CreateJsEngine ( ) )
25+ {
26+ jsEngine . EmbedHostObject ( "embeddedFunc" , someFunc ) ;
27+ output = jsEngine . Evaluate < bool > ( input ) ;
28+ }
29+
30+ // Assert
31+ Assert . True ( output ) ;
32+ }
933 }
1034}
You can’t perform that action at this time.
0 commit comments