-
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.
- Loading branch information
1 parent
7bf9f0a
commit 5375a6c
Showing
1 changed file
with
21 additions
and
21 deletions.
There are no files selected for viewing
42 changes: 21 additions & 21 deletions
42
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
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 | ||
|
||
if (-not ([System.AppDomain]::CurrentDomain.GetAssemblies().FullName | Where-Object { $_ -like "*Spectre.Console.Testing*" })) { | ||
Add-Type -Path "$PSScriptRoot\..\packages\Spectre.Console.Testing\lib\netstandard2.0\Spectre.Console.Testing.dll" | ||
} | ||
|
||
Describe "Start-SpectreDemo" { | ||
InModuleScope "PwshSpectreConsole" { | ||
|
||
It "Should have a demo function available, we're just testing the module was loaded correctly" { | ||
Get-Command "Start-SpectreDemo" | Should -Not -BeNullOrEmpty | ||
} | ||
} | ||
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 | ||
|
||
if (-not ([System.AppDomain]::CurrentDomain.GetAssemblies().FullName | Where-Object { $_ -like "*Spectre.Console.Testing*" })) { | ||
Add-Type -Path "$PSScriptRoot\..\packages\Spectre.Console.Testing\lib\net8.0\Spectre.Console.Testing.dll" | ||
} | ||
|
||
Describe "Start-SpectreDemo" { | ||
InModuleScope "PwshSpectreConsole" { | ||
|
||
It "Should have a demo function available, we're just testing the module was loaded correctly" { | ||
Get-Command "Start-SpectreDemo" | Should -Not -BeNullOrEmpty | ||
} | ||
} | ||
} |