Skip to content

Commit

Permalink
Merge pull request #40 from theohbrothers/test/entrypoint-prioritize-…
Browse files Browse the repository at this point in the history
…using-module-manifest-before-script-module-file-for-tests

Test (entrypoint): Prioritize using module manifest before script module file for tests
  • Loading branch information
joeltimothyoh authored May 15, 2024
2 parents c01aa3b + 02ec64c commit 60307a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ $script:PesterDebugPreference_ShowFullErrors = $true

try {
# Initialize variables
$moduleItem = Get-Item "$PSScriptRoot/../src/*/*.psm1"
$moduleItem = if (Test-Path "$PSScriptRoot/../src/*/*.psd1" -PathType Leaf) { Get-Item "$PSScriptRoot/../src/*/*.psd1" }
elseif (Test-Path "$PSScriptRoot/../src/*/*.psm1" -PathType Leaf) { Get-Item "$PSScriptRoot/../src/*/*.psm1" }
$MODULE_PATH = $moduleItem.FullName
$MODULE_DIR = $moduleItem.Directory
$MODULE_NAME = $moduleItem.BaseName
Expand Down

0 comments on commit 60307a5

Please sign in to comment.