Migrates to Pester5+ tests #59

Merged
OCram85 merged 47 commits from Pester5 into master 2022-07-14 13:37:13 +02:00
3 changed files with 12 additions and 17 deletions
Showing only changes of commit 5b4d043c7d - Show all commits

11
src/ModuleRoot.psm1 Normal file
View File

@ -0,0 +1,11 @@
#region module-definition
#endregion module-definition
Set-Variable -Name "CSVersion" -Value "2.0.0" -Option Constant -Scope 'Script' -ErrorAction Stop
# Get all child items in the Script path and exclude the Deploy script (if present.)
$Functions = Get-ChildItem -Path $PSScriptRoot\*.ps1 -Recurse | Where-Object { $_.BaseName -notmatch '.Tests' }
foreach ($Item in $Functions) {
. $Item.FullName
}

View File

@ -1,7 +1,7 @@
@{ @{
# Script module or binary module file associated with this manifest. # Script module or binary module file associated with this manifest.
RootModule = 'PSCredentialStore.psm1' RootModule = 'ModuleRoot.psm1'
# Version number of this module. # Version number of this module.
ModuleVersion = '0.0.9999' ModuleVersion = '0.0.9999'

View File

@ -1,16 +0,0 @@
#region module-definition
#endregion module-definition
Set-Variable -Name "CSVersion" -Value "2.0.0" -Option Constant -Scope 'Script' -ErrorAction Stop
#region dot-sourcing
# dot-sourcing all module functions. The export is handled via manifest file.
$Items = (Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath '*.ps1') -Recurse ).FullName | Where-Object {
$_ -notmatch "(Classes|Init)"
}
foreach ($Item in $Items) {
# Write-Verbose ("dot sourcing file {0}" -f $Item)
. $Item
}
#endregion dot-sourcing