mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Fixed broken tests
This commit is contained in:
@@ -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 = $_
|
||||
|
||||
@@ -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 " {
|
||||
|
||||
Reference in New Issue
Block a user