Skip to content

Commit

Permalink
test: Temp code for troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlydog committed Apr 20, 2024
1 parent 861a785 commit 01723a6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/tiPS/Public/Get-PowerShellTip.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ InModuleScope -ModuleName tiPS { # Must use InModuleScope to access script-level

$tip | Should -Not -BeNullOrEmpty
$script:UnshownTips.Count | Should -Be ($TotalNumberOfTips - 1)





# Temp code for troubleshooting tests on Windows PowerShell.
[string] $powerShellTipsJsonFilePath = Resolve-Path "$PSScriptRoot\..\PowerShellTips.json"
$content = Get-Content -Path $powerShellTipsJsonFilePath
[int] $numberOfTipsInJsonFile =
$content |
ConvertFrom-Json |
Measure-Object |
Select-Object -ExpandProperty Count
$powerShellTipsJsonFilePath | Should -Be "C:\Users\runneradmin\work\src\tiPS\PowerShellTips.json"
$content | Should -Be "not actually this"
$numberOfTipsInJsonFile | Should -Be 48
}
}

Expand Down

0 comments on commit 01723a6

Please sign in to comment.