Skip to content

Commit 48b1a52

Browse files
committed
In JavaScriptEngineSwitcher.NiL added support of NiL.JS version 2.5.1600
1 parent 2347e2f commit 48b1a52

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

src/JavaScriptEngineSwitcher.NiL/JavaScriptEngineSwitcher.NiL.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@
1616
<Import Project="../../build/nuget-for-dotnet-lib.props" />
1717

1818
<PropertyGroup>
19-
<Description>JavaScriptEngineSwitcher.NiL contains adapter `NiLJsEngine` (wrapper for the NiL JavaScript Engine (https://github.com/nilproject/NiL.JS) version 2.5.1591).</Description>
19+
<Description>JavaScriptEngineSwitcher.NiL contains adapter `NiLJsEngine` (wrapper for the NiL JavaScript Engine (https://github.com/nilproject/NiL.JS) version 2.5.1600).</Description>
2020
<PackageTags>$(PackageCommonTags);NiL</PackageTags>
2121
<PackageIconFullPath>../../Icons/JavaScriptEngineSwitcher_NiL_Logo128x128.png</PackageIconFullPath>
22-
<PackageReleaseNotes>JS run-time exception now contains a script call stack.</PackageReleaseNotes>
22+
<PackageReleaseNotes>1. NiL.JS was updated to version 2.5.1600;
23+
2. JS run-time exception now contains a script call stack.</PackageReleaseNotes>
2324
</PropertyGroup>
2425

2526
<ItemGroup>
2627
<ProjectReference Include="../JavaScriptEngineSwitcher.Core/JavaScriptEngineSwitcher.Core.csproj" />
27-
<PackageReference Include="NiL.JS" Version="2.5.1591" />
28+
<PackageReference Include="NiL.JS" Version="2.5.1600" />
2829
</ItemGroup>
2930

3031
<ItemGroup>

src/JavaScriptEngineSwitcher.NiL/NiLJsEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public sealed class NiLJsEngine : JsEngineBase
4141
/// <summary>
4242
/// Version of original JS engine
4343
/// </summary>
44-
private const string EngineVersion = "2.5.1591";
44+
private const string EngineVersion = "2.5.1600";
4545

4646
/// <summary>
4747
/// Regular expression for working with the syntax error message

src/JavaScriptEngineSwitcher.NiL/readme.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
DESCRIPTION
1313
===========
1414
JavaScriptEngineSwitcher.NiL contains adapter `NiLJsEngine` (wrapper for the
15-
NiL JavaScript Engine (https://github.com/nilproject/NiL.JS) version 2.5.1591).
15+
NiL JavaScript Engine (https://github.com/nilproject/NiL.JS) version 2.5.1600).
1616

1717
=============
1818
RELEASE NOTES
1919
=============
20-
JS run-time exception now contains a script call stack.
20+
1. NiL.JS was updated to version 2.5.1600;
21+
2. JS run-time exception now contains a script call stack.
2122

2223
=============
2324
DOCUMENTATION

test/JavaScriptEngineSwitcher.Tests/NiL/InteropTests.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,25 @@ protected override string EngineName
1919

2020
[Fact]
2121
public override void CallingOfEmbeddedDelegateWithMissingParameter()
22-
{ }
22+
{
23+
// Arrange
24+
var sumFunc = new Func<int, int, int>((a, b) => a + b);
25+
26+
const string input = "sum(678)";
27+
const int targetOutput = 678;
28+
29+
// Act
30+
int output;
31+
32+
using (var jsEngine = CreateJsEngine())
33+
{
34+
jsEngine.EmbedHostObject("sum", sumFunc);
35+
output = jsEngine.Evaluate<int>(input);
36+
}
37+
38+
// Assert
39+
Assert.Equal(targetOutput, output);
40+
}
2341

2442
#endregion
2543

0 commit comments

Comments
 (0)