Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tst/Pester.RSpec.ts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2784,4 +2784,26 @@ i -PassThru:$PassThru {
$pwd.Path | Verify-Equal $beforePWD
}
}

b 'Standard output in setup and teardown blocks does not crash tests' {
dt 'output in BeforeAll' {
$sb = {
Describe 'd' {
BeforeAll {
winrm quickconfig -quiet -force
# Start powershell and output help to standard output
$pwsh = Get-Process -Id $pid | Select-Object -ExpandProperty Path
& $pwsh -help
}

It 'i' {
1 | Should -Be 1
}
}
}

$container = New-PesterContainer -ScriptBlock $sb
Invoke-Pester -Container $container -Output None
}
}
}
Loading