< Summary

Information
Class: Elsa.Expressions.JavaScript.Providers.JavaScriptExpressionDescriptorProvider
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Providers/JavaScriptExpressionSyntaxProvider.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 25
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
GetDescriptors()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Providers/JavaScriptExpressionSyntaxProvider.cs

#LineLine coverage
 1using Elsa.Expressions.Contracts;
 2using Elsa.Expressions.Models;
 3using Elsa.Extensions;
 4using Elsa.Expressions.JavaScript.Expressions;
 5using JetBrains.Annotations;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Expressions.JavaScript.Providers;
 9
 10[UsedImplicitly]
 11internal class JavaScriptExpressionDescriptorProvider : IExpressionDescriptorProvider
 12{
 13    private const string TypeName = "JavaScript";
 14
 15    public IEnumerable<ExpressionDescriptor> GetDescriptors()
 16    {
 21117        yield return new()
 21118        {
 21119            Type = TypeName,
 21120            DisplayName = "JavaScript",
 21121            Properties = new { MonacoLanguage = "javascript" }.ToDictionary(),
 21122            HandlerFactory = ActivatorUtilities.GetServiceOrCreateInstance<JavaScriptExpressionHandler>
 21123        };
 21124    }
 25}

Methods/Properties

GetDescriptors()