@@ -88,7 +88,7 @@ Describe "Regression test for #84: Multiple Aliases per command will Export" -Ta
88
88
}
89
89
90
90
Describe " Supports building without a build.psd1" - Tag Integration {
91
- Copy-Item $PSScriptRoot \Source1 TestDrive:\Source1 - Recurse
91
+ Copy-Item $PSScriptRoot \Source1 TestDrive:\Source1 - Recurse
92
92
Remove-Item TestDrive:\Source1\build.psd1
93
93
94
94
$Build = @ { }
@@ -115,6 +115,38 @@ Describe "Supports building without a build.psd1" -Tag Integration {
115
115
$Build.Metadata.FunctionsToExport | Should - Be @ (" Get-Source" , " Set-Source" )
116
116
}
117
117
}
118
+ Describe " Supports building without a build.psd1 and not specifying a module manifest" - Tag Integration {
119
+ Copy-Item $PSScriptRoot \Source1 TestDrive:\source - Recurse
120
+ Remove-Item TestDrive:\source\build.psd1
121
+
122
+ Push-Location - StackName ' IntegrationTest' - Path TestDrive:\
123
+
124
+ $Build = @ { }
125
+
126
+ It " No longer fails if there's no build.psd1" {
127
+ $BuildParameters = @ {
128
+ SourcePath = " TestDrive:\source"
129
+ OutputDirectory = " TestDrive:\Result1"
130
+ VersionedOutputDirectory = $true
131
+ }
132
+
133
+ $Build.Output = Build-Module @BuildParameters - Passthru
134
+ }
135
+
136
+ It " Creates the same module as with a build.psd1" {
137
+ $Build.Metadata = Import-Metadata $Build.Output.Path
138
+ }
139
+
140
+ It " Should update AliasesToExport in the manifest" {
141
+ $Build.Metadata.AliasesToExport | Should - Be @ (" GS" , " GSou" , " SS" , " SSou" )
142
+ }
143
+
144
+ It " Should update FunctionsToExport in the manifest" {
145
+ $Build.Metadata.FunctionsToExport | Should - Be @ (" Get-Source" , " Set-Source" )
146
+ }
147
+
148
+ Pop-Location - StackName ' IntegrationTest'
149
+ }
118
150
119
151
Describe " Regression test for #88 not copying prefix files" - Tag Integration, Regression {
120
152
$Output = Build-Module $PSScriptRoot \build.psd1 - Passthru
0 commit comments