< Summary

Information
Class: Elsa.Extensions.ModuleExtensions
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Extensions/ModuleExtensions.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 29
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
UseJavaScript(...)100%11100%
UseJavaScript(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Extensions/ModuleExtensions.cs

#LineLine coverage
 1using Elsa.Features.Services;
 2using Elsa.Expressions.JavaScript.Features;
 3using Elsa.Expressions.JavaScript.Options;
 4
 5// ReSharper disable once CheckNamespace
 6namespace Elsa.Extensions;
 7
 8/// <summary>
 9/// Adds extensions to <see cref="IModule"/> that installs the <see cref="JavaScriptFeature"/> feature.
 10/// </summary>
 11public static class ModuleExtensions
 12{
 13    /// <summary>
 14    /// Setup the <see cref="JavaScriptFeature"/> feature.
 15    /// </summary>
 16    public static IModule UseJavaScript(this IModule module, Action<JavaScriptFeature>? configure = default)
 17    {
 23918        module.Configure(configure);
 23919        return module;
 20    }
 21
 22    /// <summary>
 23    /// Setup the <see cref="JavaScriptFeature"/> feature.
 24    /// </summary>
 25    public static IModule UseJavaScript(this IModule module, Action<JintOptions> configureJintOptions)
 26    {
 427        return module.UseJavaScript(javaScript => javaScript.ConfigureJintOptions(configureJintOptions));
 28    }
 29}