PwshSQLiteCmd-Basic.Tests.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
BeforeAll{ $currentTestModuleName=([System.IO.FileInfo]$PSCommandPath).Name.Replace(".Tests.ps1","") $env:PSModulePath=(Resolve-Path "$PSScriptRoot/..").Path+[IO.Path]::PathSeparator+$env:PSModulePath $moduleManifestFile=Import-PowerShellDataFile "$PSScriptRoot/$currentTestModuleName.psd1" # install dependency modules $moduleManifestFile.RequiredModules|Foreach-Object{ if(-not (Get-Module $_)){ # install them Install-Module $_ -Force Update-Module $_ } } Import-Module $currentTestModuleName -Force } |