Fix syntax errors, update to Pester v5 syntax
This commit is contained in:
Родитель
668e8b75ad
Коммит
f4af181407
|
@ -4,18 +4,18 @@ Describe "$($env:repoName)-Manifest" {
|
|||
|
||||
Context Manifest-Validation {
|
||||
It "[Import-PowerShellDataFile] - $($env:repoName).psd1 is a valid PowerShell Data File" {
|
||||
$DataFile | Should Not BeNullOrEmpty
|
||||
$DataFile | Should -Not BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "[Test-ModuleManifest] - $($env:repoName).psd1 should not be empty" {
|
||||
$TestModule | Should Not BeNullOrEmpty
|
||||
$TestModule | Should -Not BeNullOrEmpty
|
||||
}
|
||||
|
||||
Import-Module .\$($env:repoName).psd1 -Force -WarningAction SilentlyContinue -ErrorAction SilentlyContinue
|
||||
$command = Get-Command $($env:repoName) -ErrorAction SilentlyContinue
|
||||
|
||||
It "Should have the $($env:repoName) function available" {
|
||||
$command | Should not BeNullOrEmpty
|
||||
$command | Should -Not BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,11 +24,11 @@ Describe "$($env:repoName)-Manifest" {
|
|||
$module = Find-Module -Name $_ -ErrorAction SilentlyContinue
|
||||
|
||||
It "Should contain the $_ Module" {
|
||||
$_ -in ($TestModule).RequiredModules.Name | Should be $true
|
||||
$_ -in ($TestModule).RequiredModules.Name | Should -Be $true
|
||||
}
|
||||
|
||||
It "The $_ module should be available in the PowerShell gallery" {
|
||||
$module | Should not BeNullOrEmpty
|
||||
$module | Should -Not BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче