@@ -167,6 +167,23 @@ Function Test2
167167 $Result.PrivateFunctions.Count | Should Be 1
168168 }
169169 }
170+ Context " Create module in two locations" {
171+ It " Build with 2 target paths" {
172+ { Invoke-PSModuleBuild - Path $ScriptPath \Test-Module - TargetPath " $ScriptPath \Test-Module" , " $ScriptPath \Test-Module\Location2" } | Should Not Throw
173+ }
174+ It " Module file Exists in location 1" {
175+ Test-Path $ScriptPath \Test-Module\Test-Module .psm1 | Should Be True
176+ }
177+ It " Manifest file Exists in location 1" {
178+ Test-Path $ScriptPath \Test-Module\Test-Module .psd1 | Should Be True
179+ }
180+ It " Module file Exists in locations 2" {
181+ Test-Path $ScriptPath \Test-Module\Location2\Test-Module .psm1 | Should Be True
182+ }
183+ It " Manifest file Exists in locations 2" {
184+ Test-Path $ScriptPath \Test-Module\Location2\Test-Module .psd1 | Should Be True
185+ }
186+ }
170187 Context " Duplicate function name build" {
171188 $Module = @"
172189Function Test1 {
@@ -202,23 +219,6 @@ Function Test2
202219 { Invoke-PSModuleBuild - Path $ScriptPath \Test-Module } | Should Throw
203220 }
204221 }
205- Context " Create module in two locations" {
206- It " Build with 2 target paths" {
207- { Invoke-PSModuleBuild - Path $ScriptPath \Test-Module - TargetPath " $ScriptPath \Test-Module" , " $ScriptPath \Test-Module\Location2" } | Should Not Throw
208- }
209- It " Module file Exists in location 1" {
210- Test-Path $ScriptPath \Test-Module\Test-Module .psm1 | Should Be True
211- }
212- It " Manifest file Exists in location 1" {
213- Test-Path $ScriptPath \Test-Module\Test-Module .psd1 | Should Be True
214- }
215- It " Module file Exists in locations 2" {
216- Test-Path $ScriptPath \Test-Module\Location2\Test-Module .psm1 | Should Be True
217- }
218- It " Manifest file Exists in locations 2" {
219- Test-Path $ScriptPath \Test-Module\Location2\Test-Module .psd1 | Should Be True
220- }
221- }
222222}
223223
224224# Clean up!
0 commit comments