mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
moved out of BeforeAll
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user