Skip to content

Commit 0bd293b

Browse files
committed
Fix the last set of tests broken by Pester 5 scope
1 parent 4e06f10 commit 0bd293b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Tests/Integration/Parameters.Tests.ps1

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,25 @@ Describe "Parameters.Set in build manifest" -Tag Integration {
44
BeforeAll {
55
. $PSScriptRoot/../Convert-FolderSeparator.ps1
66
New-Item $PSScriptRoot/Result3/Parameters/ReadMe.md -ItemType File -Force
7-
8-
$Output = Build-Module $PSScriptRoot/Parameters/build.psd1
9-
if ($Output) {
10-
$Module = [IO.Path]::ChangeExtension($Output.Path, "psm1")
11-
$Metadata = Import-Metadata $Output.Path
12-
}
13-
147
}
158

16-
It "Passthru works" {
9+
It "Passthru is read from the build manifest" {
10+
$Output = Build-Module "$PSScriptRoot/Parameters/build.psd1"
1711
$Output | Should -Not -BeNullOrEmpty
12+
$Output.Path | Convert-FolderSeparator | Should -Be (Convert-FolderSeparator "$PSScriptRoot/Result3/Parameters/3.0.0/Parameters.psd1")
1813
}
1914

2015
It "The Target is Build" {
21-
"$PSScriptRoot/Result3/Parameters/ReadMe.md" | Should -Exist
16+
"$PSScriptRoot/Result3/Parameters/3.0.0/Parameters.psm1" | Should -Exist
2217
}
2318

2419
It "The version is set" {
20+
$Metadata = Import-Metadata "$PSScriptRoot/Result3/Parameters/3.0.0/Parameters.psd1"
2521
$Metadata.ModuleVersion | Should -Be "3.0.0"
2622
}
2723

2824
It "The PreRelease is set" {
25+
$Metadata = Import-Metadata "$PSScriptRoot/Result3/Parameters/3.0.0/Parameters.psd1"
2926
$Metadata.PrivateData.PSData.Prerelease | Should -Be 'alpha001'
3027
}
3128
}

0 commit comments

Comments
 (0)