< Summary

Information
Class: Elsa.Expressions.JavaScript.Providers.WorkflowVariablesVariableProvider
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Providers/WorkflowVariablesVariableProvider.cs
Line coverage
20%
Covered lines: 1
Uncovered lines: 4
Coverable lines: 5
Total lines: 19
Line coverage: 20%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
GetVariableDefinitions()0%620%

File(s)

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

#LineLine coverage
 1using Elsa.Expressions.JavaScript.Options;
 2using Elsa.Expressions.JavaScript.TypeDefinitions.Abstractions;
 3using Elsa.Expressions.JavaScript.TypeDefinitions.Models;
 4using JetBrains.Annotations;
 5using Microsoft.Extensions.Options;
 6
 7namespace Elsa.Expressions.JavaScript.Providers;
 8
 9[UsedImplicitly]
 110internal class WorkflowVariablesVariableProvider(IOptions<JintOptions> options) : VariableDefinitionProvider
 11{
 12    protected override IEnumerable<VariableDefinition> GetVariableDefinitions(TypeDefinitionContext context)
 13    {
 014        if(options.Value.DisableWrappers)
 015            yield break;
 16
 017        yield return CreateVariableDefinition(x => x.Name("variables").Type("WorkflowVariables"));
 018    }
 19}