< Summary - Kestrun — Combined Coverage

Information
Class: Public.Runtime.Test-KrCapability
Assembly: Kestrun.PowerShell.Public
File(s): /home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Runtime/Test-KrCapability.ps1
Tag: Kestrun/Kestrun@2d87023b37eb91155071c91dd3d6a2eeb3004705
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 31
Line coverage: 0%
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

Coverage history

Coverage history 0 25 50 75 100 10/13/2025 - 16:52:37 Line coverage: 0% (0/3) Total lines: 31 Tag: Kestrun/Kestrun@10d476bee71c71ad215bb8ab59f219887b5b4a5e

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Runtime/Test-KrCapability.ps1

#LineLine coverage
 1<#
 2.SYNOPSIS
 3    Check if a specific feature is supported in the current Kestrun runtime environment.
 4.DESCRIPTION
 5    This cmdlet checks if a given feature, identified by its name, is supported in the current Kestrun runtime environme
 6    It can be used to determine if certain capabilities are available based on the runtime version and configuration.
 7.PARAMETER Feature
 8    The name of the feature to check. This can be either the name of a KnownFeature enum value or a raw string represent
 9.EXAMPLE
 10    Test-KrCapability -Feature "Http3"
 11    This example checks if the Http3 feature is supported in the current Kestrun runtime environment.
 12.EXAMPLE
 13    Test-KrCapability -Feature "SomeOtherFeature"
 14    This example checks if a feature named "SomeOtherFeature" is supported, using a raw string.
 15#>
 16function Test-KrCapability {
 17    [KestrunRuntimeApi('Everywhere')]
 18    [CmdletBinding()]
 19    [OutputType([bool])]
 20    param(
 21        [Parameter(Mandatory)]
 22        [string]$Feature
 23    )
 24    # Allow either enum name or raw string
 25    try {
 026        $enum = [Kestrun.KestrunRuntimeInfo+KnownFeature]::$Feature
 027        return [Kestrun.KestrunRuntimeInfo]::Supports($enum)
 28    } catch [System.ArgumentException] {
 029        return [Kestrun.KestrunRuntimeInfo]::Supports($Feature)
 30    }
 31}

Methods/Properties

Test-KrCapability()