mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-07 09:11:18 +00:00
Implement testing using Pester
Integrate with AppVeyor
This commit is contained in:
parent
ca3a0ae014
commit
3741af6fa3
@ -7,19 +7,26 @@
|
||||
"extract_dir": "pester-3.3.6",
|
||||
"bin": "bin\\pester.bat",
|
||||
"post_install": "
|
||||
$import = \"try { `$null = gcm pester -ea stop; import-module `\"$dir\\pester.psm1`\" } catch { }\"
|
||||
|
||||
if($profile) {
|
||||
'adding pester to powershell profile...'
|
||||
if(!(test-path $profile)) {
|
||||
'powershell profile doesn''t exist. creating...'
|
||||
$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
|
||||
success 'pester added to powershell profile.'
|
||||
}
|
||||
} else { warn 'no powershell profile found. the pester module will not be imported each session.' }
|
||||
|
||||
'importing pester for current session...'
|
||||
iex \"$import\"
|
||||
"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user