< Summary - Kestrun — Combined Coverage

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

Metrics

File(s)

/home/runner/work/Kestrun/Kestrun/src/PowerShell/Kestrun/Public/Helper/Clear-KrEnvironmentOverride.ps1

#LineLine coverage
 1<#
 2.SYNOPSIS
 3    Clears any Kestrun environment override for the current PowerShell session.
 4.DESCRIPTION
 5    Clears any Kestrun environment override for the current PowerShell session.
 6    This reverts Kestrun to use the default environment, which is 'Production' unless
 7    changed by the KESTRUN_ENVIRONMENT environment variable.
 8.PARAMETER WhatIf
 9    Shows what would happen if the cmdlet runs. The cmdlet is not run.
 10.PARAMETER Confirm
 11    Prompts you for confirmation before running the cmdlet.
 12.EXAMPLE
 13    Clear-KrEnvironmentOverride
 14    Clears any Kestrun environment override, reverting to the default environment.
 15    This is useful for resetting the environment after running tests or examples.
 16#>
 17function Clear-KrEnvironmentOverride {
 18    [KestrunRuntimeApi('Everywhere')]
 19    [CmdletBinding(SupportsShouldProcess)]
 20    param()
 021    if ($PSCmdlet.ShouldProcess('Kestrun Environment', 'Clear override')) {
 022        [Kestrun.Runtime.EnvironmentHelper]::ClearOverride()
 023        [Kestrun.Runtime.EnvironmentHelper]::Name
 24    }
 25}

Methods/Properties

Clear-KrEnvironmentOverride()