-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a basic test to kick off the build script if I forgot to run it b…
…efore Invoke-Pester and validate mock params explicitly because parameterfilter failures are hard to debug
- Loading branch information
1 parent
ba14cf6
commit 9cc67eb
Showing
2 changed files
with
39 additions
and
11 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
PwshSpectreConsole.Tests/@init/Start-SpectreDemo.tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Remove-Module PwshSpectreConsole -Force -ErrorAction SilentlyContinue | ||
try { | ||
Import-Module "$PSScriptRoot\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force | ||
} catch { | ||
Write-Warning "Failed to import PwshSpectreConsole module, rebuilding..." | ||
& "$PSScriptRoot\..\..\PwshSpectreConsole\build.ps1" | ||
} | ||
|
||
Import-Module "$PSScriptRoot\..\..\PwshSpectreConsole\PwshSpectreConsole.psd1" -Force | ||
|
||
Describe "Start-SpectreDemo" { | ||
InModuleScope "PwshSpectreConsole" { | ||
|
||
It "Should have a demo function available, we're just testing the module was loaded correctly" { | ||
$demo = Get-Command Start-SpectreDemo | ||
$demo.Name | Should -Be "Start-SpectreDemo" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters