42 lines
1.2 KiB
PowerShell
42 lines
1.2 KiB
PowerShell
. $PSScriptRoot\..\..\Load-PesterModules.ps1
|
|
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.tests\.', '.'
|
|
$functionPath = Join-Path -Path $here -ChildPath $sut
|
|
Write-Host "Overriding SUT: $functionPath"
|
|
Import-Module $functionPath -Force
|
|
$moduleForMock = ""
|
|
|
|
Describe "Test-AlkamiWebExtensionManifest10" {
|
|
Context "Test valid manifest" {
|
|
$result = Test-AlkamiWebExtensionManifest10 @{
|
|
appInstall = 'client'
|
|
}
|
|
|
|
It "Tested successfully" {
|
|
$result.success | Should -BeTrue
|
|
}
|
|
|
|
It "Produced no error messages" {
|
|
$result.results.Count | Should -Be 0
|
|
}
|
|
}
|
|
|
|
Context "Test invalid manifest" {
|
|
$result = Test-AlkamiWebExtensionManifest10 @{
|
|
appInstall = 'garbage'
|
|
}
|
|
|
|
It "Tested successfully" {
|
|
$result.success | Should -BeFalse
|
|
}
|
|
|
|
It "Actually produced warnings" {
|
|
$result.results | Should -Not -BeNullOrEmpty
|
|
}
|
|
|
|
It "Produced at least one warning statements" {
|
|
$result.results.Count | Should -BeGreaterOrEqual 1
|
|
}
|
|
}
|
|
}
|