mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
29 lines
975 B
PowerShell
29 lines
975 B
PowerShell
|
#===========================================================================
|
||
|
# Tests - Functions
|
||
|
#===========================================================================
|
||
|
|
||
|
Describe "Functions"{
|
||
|
|
||
|
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
||
|
|
||
|
context "$($psitem.BaseName)" {
|
||
|
BeforeEach -Scriptblock {
|
||
|
. $fullname
|
||
|
}
|
||
|
|
||
|
It "Imports with no errors" -TestCases @{
|
||
|
basename = $($psitem.BaseName)
|
||
|
fullname = $psitem.FullName
|
||
|
} {
|
||
|
Get-ChildItem function:\$basename | should -Not -BeNullOrEmpty
|
||
|
}
|
||
|
It "Contains Description" -TestCases @{
|
||
|
basename = $($psitem.BaseName)
|
||
|
fullname = $psitem.FullName
|
||
|
} {
|
||
|
get-help $basename -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Description | should -Not -BeNullOrEmpty
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|