-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDoTests.ps1
More file actions
28 lines (21 loc) · 787 Bytes
/
DoTests.ps1
File metadata and controls
28 lines (21 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# param(
# [Switch]$DontCreateZip
# )
##
# Used in Appveyor.yml
##
$PSVersionTable.PSVersion
## Create the zip before the tests run
## Otherwise the EPPlus.dll is in use after the Pester run
$ModuleVersion = (Get-Content -Raw .\PSFuzzySearch.psd1) | Invoke-Expression | ForEach-Object ModuleVersion
# if (!$DontCreateZip) {
# $dest = "ImportExcel-{0}-{1}.zip" -f $ModuleVersion, (Get-Date).ToString("yyyyMMddHHmmss")
# Compress-Archive -Path . -DestinationPath .\$dest
# }
if ($null -eq (Get-Module -ListAvailable pester)) {
Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser
}
$result = Invoke-Pester -Script $PSScriptRoot\__tests__ -Verbose -PassThru
if ($result.FailedCount -gt 0) {
throw "$($result.FailedCount) tests failed."
}