Skip to content
Discussion options

You must be logged in to vote

We appreciate the feedback. I've long wanted to add a follow-along tutorial for testing a reference module from start to finish. One day 🤞

Write-Output doesn't appear to work. (Where is that stream going?), have to use write-host for verifying "is this chunk of code firing when I expect"

The output stream is captured so any objects don't break the test report. You can still access it through the result object by using -PassThru or enabling Run.PassThru setting in PesterConfiguration. Example:

$run = Invoke-Pester -PassThru -Output Detailed -Container (New-PesterContainer -ScriptBlock {
  Describe 'demo' {
    It 'i' {
      $someVar= Write-Output "Some output"
      $someVar | Should -B…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fflaten
Comment options

Answer selected by nohwnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants