Files
ImportExcel/UnitTests/ImportExcelTests/Simple.tests.ps1
2018-05-27 12:45:57 -04:00

24 lines
1.1 KiB
PowerShell
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
Describe "Tests" {
BeforeAll {
$data = $null
$timer = Measure-Command {
$data = Import-Excel $PSScriptRoot\Simple.xlsx
}
}
It "Should have two items" {
$data.count | Should be 2
}
It "Should have items a and b" {
$data[0].p1 | Should be "a"
$data[1].p1 | Should be "b"
}
It "Should read fast <25 milliseconds" {
$timer.TotalMilliseconds | should BeLessThan 25
}
}