mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-08 17:51:21 +00:00
Add pester
Pester provides a framework for running Unit Tests to execute and validate PowerShell commands inside of PowerShell.
This commit is contained in:
parent
71e441f347
commit
9e24299443
25
pester.json
Normal file
25
pester.json
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"version": "3.3.6",
|
||||||
|
"license": "https://raw.githubusercontent.com/pester/Pester/master/LICENSE",
|
||||||
|
"url": "https://github.com/pester/pester/archive/3.3.6.tar.gz",
|
||||||
|
"homepage": "https://github.com/pester/Pester",
|
||||||
|
"hash": "38a9ae3c829b02fe90fb8acbed564ffb883fb0175a6a00b501ac3663f03d6b9a",
|
||||||
|
"extract_dir": "pester-3.3.6",
|
||||||
|
"bin": "bin\\pester.bat",
|
||||||
|
"post_install": "
|
||||||
|
if(!(test-path $profile)) {
|
||||||
|
$profile_dir = split-path $profile
|
||||||
|
if(!(test-path $profile_dir)) { mkdir $profile_dir > $null }
|
||||||
|
'' > $profile
|
||||||
|
}
|
||||||
|
|
||||||
|
$import = \"try { `$null = gcm pester -ea stop; import-module `\"$dir\\pester.psm1`\" } catch { }\"
|
||||||
|
$text = get-content $profile
|
||||||
|
if (($text | sls 'pester') -eq $null) {
|
||||||
|
$new_profile = @($text) + $import
|
||||||
|
$new_profile > $profile
|
||||||
|
}
|
||||||
|
|
||||||
|
iex \"$import\"
|
||||||
|
"
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user