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()
394
394
public virtual void SupportsFunctionBindMethod ( )
395
395
{
396
396
// 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 }
403
410
;" ;
404
411
405
- const string input1 = "getA();" ;
412
+ const string input1 = "a. getA();" ;
406
413
const int targetOutput1 = 5 ;
407
414
408
- const string input2 = "getA.bind(module )();" ;
415
+ const string input2 = "a. getA.bind(otherContext )();" ;
409
416
const int targetOutput2 = 12 ;
410
417
411
418
// Act
Original file line number Diff line number Diff line change @@ -9,15 +9,6 @@ protected override string EngineName
9
9
{
10
10
get { return "YantraJsEngine" ; }
11
11
}
12
-
13
-
14
- #region Function methods
15
-
16
- [ Fact ]
17
- public override void SupportsFunctionBindMethod ( )
18
- { }
19
-
20
- #endregion
21
12
}
22
13
}
23
14
#endif
You can’t perform that action at this time.
0 commit comments