diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Clear-Item.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Clear-Item.Tests.ps1 index 5bec6948ded..f97c0911f2b 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Clear-Item.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Clear-Item.Tests.ps1 @@ -4,10 +4,11 @@ Describe "Clear-Item tests" -Tag "CI" { BeforeAll { ${myClearItemVariableTest} = "Value is here" } + It "Clear-Item can clear an item" { $myClearItemVariableTest | Should -BeExactly "Value is here" - Clear-Item variable:myClearItemVariableTest - test-path variable:myClearItemVariableTest | Should -BeTrue + Clear-Item -Path variable:myClearItemVariableTest + Test-Path -Path variable:myClearItemVariableTest | Should -BeTrue $myClearItemVariableTest | Should -BeNullOrEmpty } }