diff --git a/DoTests.ps1 b/DoTests.ps1 index 3428c46..b424631 100644 --- a/DoTests.ps1 +++ b/DoTests.ps1 @@ -1,9 +1,8 @@ # Get-Module -ListAvailable pester | Out-Host # return -# if ((Get-Module -ListAvailable pester) -eq $null) { -# Install-Module -Name Pester -Repository PSGallery -Force -# } +if ((Get-Module -ListAvailable pester) -eq $null) { + Install-Module -Name Pester -Repository PSGallery -Force +} -Install-Module -Name Pester -Repository PSGallery -Force Invoke-Pester -Script $PSScriptRoot\UnitTests \ No newline at end of file diff --git a/UnitTests/ImportExcelTests/Simple.tests.ps1 b/UnitTests/ImportExcelTests/Simple.tests.ps1 index d97314d..f17afee 100644 --- a/UnitTests/ImportExcelTests/Simple.tests.ps1 +++ b/UnitTests/ImportExcelTests/Simple.tests.ps1 @@ -1,12 +1,16 @@ 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 - } - } + # BeforeAll { + # $data = $null + # $timer = Measure-Command { + # $data = Import-Excel $PSScriptRoot\Simple.xlsx + # } + # } It "Should have two items" { $data.count | Should be 2