-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
While looking at the current tests Export-Csv I found the following issues:
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Line 14 in f604b0e
| { $testObject | Export-Csv -ErrorAction SilentlyContinue } | Should Throw |
Should use
ShouldBeErrorId and test for a proper FQEID
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Line 22 in f604b0e
| $piped[0] | Should Match ".String" |
Should be
Should Be and a full srting instead of partial match since this is static.
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Line 48 in f604b0e
| { $testObject | Export-Csv -Path $testCsv } | Should Not Throw |
Should be
epcsv here to test the alias.
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Lines 69 to 70 in f604b0e
| $filePath = Join-Path $TestDrive -ChildPath "test.csv" | |
| $newLine = [environment]::NewLine |
should be wrapped in a
BeforeAll{}
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Utility/Export-Csv.Tests.ps1
Line 64 in f604b0e
| Remove-Item $aliasObject -Force |
This can be removed because the
$TestDrive will clean up after itself.