mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-10 21:33:16 +00:00
moved out of BeforeAll
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
# Get-Module -ListAvailable pester | Out-Host
|
# Get-Module -ListAvailable pester | Out-Host
|
||||||
# return
|
# return
|
||||||
# if ((Get-Module -ListAvailable pester) -eq $null) {
|
if ((Get-Module -ListAvailable pester) -eq $null) {
|
||||||
# Install-Module -Name Pester -Repository PSGallery -Force
|
Install-Module -Name Pester -Repository PSGallery -Force
|
||||||
# }
|
}
|
||||||
|
|
||||||
Install-Module -Name Pester -Repository PSGallery -Force
|
|
||||||
Invoke-Pester -Script $PSScriptRoot\UnitTests
|
Invoke-Pester -Script $PSScriptRoot\UnitTests
|
||||||
@@ -1,12 +1,16 @@
|
|||||||
Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
|
Import-Module $PSScriptRoot\..\..\ImportExcel.psd1
|
||||||
|
$data = $null
|
||||||
|
$timer = Measure-Command {
|
||||||
|
$data = Import-Excel $PSScriptRoot\Simple.xlsx
|
||||||
|
}
|
||||||
|
|
||||||
Describe "Tests" {
|
Describe "Tests" {
|
||||||
BeforeAll {
|
# 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" {
|
It "Should have two items" {
|
||||||
$data.count | Should be 2
|
$data.count | Should be 2
|
||||||
|
|||||||
Reference in New Issue
Block a user