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
2
5
{
3
6
public class InteropTests : InteropTestsBase
4
7
{
5
8
protected override string EngineName
6
9
{
7
10
get { return "ChakraCoreJsEngine" ; }
8
11
}
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
+ }
9
33
}
10
34
}
You can’t perform that action at this time.
0 commit comments