mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Update test framework and tests to support 4x version of Pester (#6064)
* Test fixes and changes needed to support Pester 4.0.8 * Replace 'Should Contain' with new 'Should FileContentMatch' assertion Explicitly check for string creation with write-output * Use the current version of pester and install it in modulesDir * Simplify logic for relative path test. Multiple '..' is not needed for a relative path, a single one will do. Also, on multi-drive systems using split-path -noqualifier will probably do the wrong thing with regard to constructing a correct path. Remove extraneous Should Not Throw test, if this throws, the test will fail, we don't need to explicitly assert the not throw * In some environments it is possible that computer name is 'localhost', so that should be allowed * [feature] Add link for migrating tests from Pester v3 to v4 Fix up capitalization and white space issues Change one test to check FullyQualifiedErrorId rather than just `Should Throw` * [feature] update invoke-item test to handle the case where multiple notepad processes are running * Fix spelling issue with Pester 4x, calling it Pester 4 should be sufficient
This commit is contained in:
committed by
Aditya Patwardhan
parent
fa40a87bd7
commit
99a7d38cae
@@ -90,7 +90,7 @@
|
||||
|
||||
foreach($command in $commands)
|
||||
{
|
||||
$command.GetType().Name | should be @("AliasInfo","FunctionInfo","CmdletInfo","FilterInfo")
|
||||
$command.GetType().Name | Should BeIn @("AliasInfo","FunctionInfo","CmdletInfo","FilterInfo")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,4 +102,4 @@
|
||||
It "Get- is prepended to commands" {
|
||||
(& 'location').Path | Should Be (get-location).Path
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user