< Summary

Information
Class: Elsa.Expressions.JavaScript.Providers.CommonTypeDefinitionProvider
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/Providers/CommonTypesDefinitionProvider.cs
Line coverage
20%
Covered lines: 1
Uncovered lines: 4
Coverable lines: 5
Total lines: 19
Line coverage: 20%
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
.ctor(...)100%11100%
GetTypeDefinitions()100%210%

File(s)

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

#LineLine coverage
 1using System.Text.Json.Nodes;
 2using Elsa.Expressions.JavaScript.TypeDefinitions.Abstractions;
 3using Elsa.Expressions.JavaScript.TypeDefinitions.Contracts;
 4using Elsa.Expressions.JavaScript.TypeDefinitions.Models;
 5
 6namespace Elsa.Expressions.JavaScript.Providers;
 7
 8/// <summary>
 9/// Produces <see cref="TypeDefinition"/>s for common types.
 10/// </summary>
 111internal class CommonTypeDefinitionProvider(ITypeDescriber typeDescriber) : TypeDefinitionProvider
 12{
 13    protected override IEnumerable<TypeDefinition> GetTypeDefinitions(TypeDefinitionContext context)
 14    {
 015        yield return typeDescriber.DescribeType(typeof(Guid));
 016        yield return typeDescriber.DescribeType(typeof(JsonObject));
 017        yield return typeDescriber.DescribeType(typeof(Random));
 018    }
 19}