Fix syntax errors, update to Pester v5 syntax

This commit is contained in:
Blake Drumm 2022-08-18 13:31:05 -04:00 коммит произвёл GitHub
Родитель 668e8b75ad
Коммит f4af181407
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -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
}
}
}