File tree Expand file tree Collapse file tree 2 files changed +15
-17
lines changed
test/JavaScriptEngineSwitcher.Tests Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -394,18 +394,25 @@ public virtual void SupportsDateToIsoStringMethod()
394394 public virtual void SupportsFunctionBindMethod ( )
395395 {
396396 // Arrange
397- const string initCode = @"var a = 5,
398- module = {
399- a: 12,
400- getA: function() { return this.a; }
401- },
402- getA = module.getA
397+ const string initCode = @"var A = (function () {
398+ function A(a) {
399+ this.a = a;
400+ }
401+
402+ A.prototype.getA = function() {
403+ return this.a;
404+ };
405+
406+ return A;
407+ })(),
408+ a = new A(5),
409+ otherContext = { a: 12 }
403410 ;" ;
404411
405- const string input1 = "getA();" ;
412+ const string input1 = "a. getA();" ;
406413 const int targetOutput1 = 5 ;
407414
408- const string input2 = "getA.bind(module )();" ;
415+ const string input2 = "a. getA.bind(otherContext )();" ;
409416 const int targetOutput2 = 12 ;
410417
411418 // Act
Original file line number Diff line number Diff line change @@ -9,15 +9,6 @@ protected override string EngineName
99 {
1010 get { return "YantraJsEngine" ; }
1111 }
12-
13-
14- #region Function methods
15-
16- [ Fact ]
17- public override void SupportsFunctionBindMethod ( )
18- { }
19-
20- #endregion
2112 }
2213}
2314#endif
You can’t perform that action at this time.
0 commit comments