Fixed broken tests

This commit is contained in:
jhoneill
2019-02-25 20:53:11 +00:00
parent 7e465e3729
commit 28fd5512bb
2 changed files with 5 additions and 2 deletions

View File

@@ -539,6 +539,9 @@
)
#The write-verbose commands have been commented out below - even if verbose is silenced they cause a significiant performance impact and if it's on they will cause a flood of messages.
Switch ($CellValue) {
{ $null -eq $_ } {
break
}
{ $_ -is [DateTime]} {
# Save a date with one of Excel's built in formats format
$TargetCell.Value = $_

View File

@@ -9,7 +9,7 @@ Describe ExportExcel {
$path = "$env:TEMP\Test.xlsx"
Remove-item -Path $path -ErrorAction SilentlyContinue
#Test with a maximum of 100 processes for speed; export all properties, then export smaller subsets.
$processes = Get-Process | select-object -first 100 -Property * -excludeProperty Parent
$processes = Get-Process | where {$_.StartTime} | Select-Object -first 100 -Property * -excludeProperty Parent
$propertyNames = $Processes[0].psobject.properties.name
$rowcount = $Processes.Count
$Processes | Export-Excel $path #-show
@@ -135,7 +135,7 @@ Describe ExportExcel {
it "Created the worksheet with the expected name, number of rows and number of columns " {
$ws.Name | Should be "sheet1"
$ws.Dimension.Columns | Should be 1
$ws.Dimension.Rows | Should be 12
$ws.Dimension.End.Row | Should be 12
}
it "Set the default style for the sheet as expected " {