docs: finalize error handling standard
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
BeforeAll {
|
||||
$script:dscModuleName = 'M365FoundationsCISReport'
|
||||
|
||||
Import-Module -Name $script:dscModuleName
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
# Unload the module being tested so that it doesn't impact any other tests.
|
||||
Get-Module -Name $script:dscModuleName -All | Remove-Module -Force
|
||||
}
|
||||
|
||||
Describe Get-PrivateFunction {
|
||||
Context 'When calling the function with string value' {
|
||||
It 'Should return a single object' {
|
||||
InModuleScope -ModuleName $dscModuleName {
|
||||
$return = Get-PrivateFunction -PrivateData 'string'
|
||||
|
||||
($return | Measure-Object).Count | Should -Be 1
|
||||
}
|
||||
}
|
||||
|
||||
It 'Should return a string based on the parameter PrivateData' {
|
||||
InModuleScope -ModuleName $dscModuleName {
|
||||
$return = Get-PrivateFunction -PrivateData 'string'
|
||||
|
||||
$return | Should -Be 'string'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user