mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Add Pester Test for Get-PSBreakpoint, Import-Module, Sort-Object
This commit is contained in:
1 parent
3d967c33ec
commit
6be57a0b5c
3 files changed
+75
No files matched your search
@@ -0,0 +1,24 @@
|
||||
Describe "Import-Module" {
|
||||
$moduleName = "Microsoft.PowerShell.Platform"
|
||||
|
||||
BeforeEach {
|
||||
Remove-Module -Name $moduleName -Force
|
||||
(Get-Module -Name $moduleName).Name | Should BeNullOrEmpty
|
||||
}
|
||||
|
||||
AfterEach {
|
||||
Import-Module -Name $moduleName -Force
|
||||
(Get-Module -Name $moduleName).Name | Should Be $moduleName
|
||||
}
|
||||
|
||||
It "should be able to add a module with using Name switch" {
|
||||
{ Import-Module -Name $moduleName } | Should Not Throw
|
||||
(Get-Module -Name $moduleName).Name | Should Be $moduleName
|
||||
}
|
||||
|
||||
It "should be able to add a module with using ModuleInfo switch" {
|
||||
$a = Get-Module -ListAvailable $moduleName
|
||||
{ Import-Module -ModuleInfo $a } | Should Not Throw
|
||||
(Get-Module -Name $moduleName).Name | Should Be $moduleName
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user