mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-06 18:43:25 +00:00
chk file exists
This commit is contained in:
@@ -1,27 +1,33 @@
|
|||||||
Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
|
Describe "test" {
|
||||||
$data = $null
|
It '$PSScriptRoot\Simple.xlsx should exist' {
|
||||||
$timer = Measure-Command {
|
Test-Path $PSScriptRoot\Simple.xlsx | Should Be $true
|
||||||
$data = Import-Excel $PSScriptRoot\Simple.xlsx
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Tests" {
|
# Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
|
||||||
# BeforeAll {
|
# $data = $null
|
||||||
# $data = $null
|
# $timer = Measure-Command {
|
||||||
# $timer = Measure-Command {
|
# $data = Import-Excel $PSScriptRoot\Simple.xlsx
|
||||||
# $data = Import-Excel $PSScriptRoot\Simple.xlsx
|
# }
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
It "Should have two items" {
|
# Describe "Tests" {
|
||||||
$data.count | Should be 2
|
# # BeforeAll {
|
||||||
}
|
# # $data = $null
|
||||||
|
# # $timer = Measure-Command {
|
||||||
|
# # $data = Import-Excel $PSScriptRoot\Simple.xlsx
|
||||||
|
# # }
|
||||||
|
# # }
|
||||||
|
|
||||||
It "Should have items a and b" {
|
# It "Should have two items" {
|
||||||
$data[0].p1 | Should be "a"
|
# $data.count | Should be 2
|
||||||
$data[1].p1 | Should be "b"
|
# }
|
||||||
}
|
|
||||||
|
|
||||||
It "Should read fast <25 milliseconds" {
|
# It "Should have items a and b" {
|
||||||
$timer.TotalMilliseconds | should BeLessThan 25
|
# $data[0].p1 | Should be "a"
|
||||||
}
|
# $data[1].p1 | Should be "b"
|
||||||
}
|
# }
|
||||||
|
|
||||||
|
# It "Should read fast <25 milliseconds" {
|
||||||
|
# $timer.TotalMilliseconds | should BeLessThan 25
|
||||||
|
# }
|
||||||
|
# }
|
||||||
Reference in New Issue
Block a user