Files
ImportExcel/UnitTests/ImportExcelTests/Simple.tests.ps1
dfinke 767d75d0c5 try
2018-05-27 13:27:15 -04:00

46 lines
1.5 KiB
PowerShell

Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
Describe "test" {
It 'Export-Excel should be there' {
((Get-Command export-excel -ErrorAction SilentlyContinue) -eq $null) | Should Be $false
}
It "$PSScriptRoot\Simple.xlsx should exist" {
"$PSScriptRoot\Simple.xlsx" | should be "C:\projects\importexcel\UnitTests\ImportExcelTests\Simple.xlsx"
# "$pwd\Simple.xlsx" | should be "C:\Users\Douglas\Documents\GitHub\ImportExcel\UnitTests\ImportExcelTests\Simple.xlsx"
# ((ls "$pwd\Simple.xlsx") -eq $null) | should be $false
# ((ls "$PSScriptRoot\Simple.xlsx") -eq $null) | should be $false
# Test-Path "$PSScriptRoot\Simple.xlsx" | Should Be $true
#$PSScriptRoot\Simple.xlsx | should be "C:\projects\importexcel\UnitTests\ImportExcelTests\Simple.xlsx"
}
}
# Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
# $data = $null
# $timer = Measure-Command {
# $data = Import-Excel $PSScriptRoot\Simple.xlsx
# }
# 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
# }
# }