We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f5f866 commit 8066979Copy full SHA for 8066979
test/DscResource/PSResourceGetDSCResource.Tests.ps1
@@ -35,7 +35,13 @@ function SetupDsc {
35
36
$env:PATH += "$pathSeparator$resourcePath"
37
38
- Import-Module $resourcePath -Verbose -Force
+ $moduleToTest = Join-Path $resourcePath 'Microsoft.PowerShell.PSResource.psd1'
39
+
40
+ if (-not (Test-Path -Path $moduleToTest)) {
41
+ throw "Module to test not found: $moduleToTest"
42
+ }
43
44
+ Import-Module $moduleToTest -Verbose -Force
45
}
46
47
function SetupTestRepos {
0 commit comments