diff --git a/test/powershell/New-Item.Tests.ps1 b/test/powershell/New-Item.Tests.ps1 index 60e600019..7a57ff51d 100644 --- a/test/powershell/New-Item.Tests.ps1 +++ b/test/powershell/New-Item.Tests.ps1 @@ -1,5 +1,10 @@ function Clean-State { + if (Test-Path $FullyQualifiedLink) + { + Remove-Item $FullyQualifiedLink -Force + } + if (Test-Path $FullyQualifiedFile) { Remove-Item $FullyQualifiedFile -Force @@ -9,11 +14,6 @@ { Remove-Item $FullyQualifiedFolder -Recurse -Force } - - if (Test-Path $FullyQualifiedLink) - { - Remove-Item $FullyQualifiedLink -Force - } } Describe "New-Item" {