Migrates to Pester5+ tests #59
11
src/ModuleRoot.psm1
Normal file
11
src/ModuleRoot.psm1
Normal 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
|
||||||
|
}
|
@ -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'
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user