-
-
Save Splaxi/08b55e304c65e61d736d9f9721bd657f to your computer and use it in GitHub Desktop.
testiong examples code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Function = 'Get-DbcCheck' | |
Describe "$Function" { | |
Context "Checking $Function Examples" { | |
$Examples = Get-Help $Function -Examples | |
foreach ($examplecode in $Examples.examples.example.Code) { | |
It "Example Code $examplecode should not throw" { | |
{$examplecode} | Should -Not -Throw | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment