Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected output when passing hashtable to Invoke-Pester #699

Closed
nohwnd opened this issue Jan 22, 2017 · 0 comments
Closed

Unexpected output when passing hashtable to Invoke-Pester #699

nohwnd opened this issue Jan 22, 2017 · 0 comments
Assignees
Milestone

Comments

@nohwnd
Copy link
Member

nohwnd commented Jan 22, 2017

Reported by @irwins here

Executing all tests in System.Collection.Hashtable
image

Got this when passing parameters...

$testADInfra = @(
   @{ 
      Path = $pesterFile
      Parameters = @{ 
         Source = $src
         Target = $tgt
      } 
   }
)

Invoke-Pester -Path $testADInfra -PassThru -Tag $tag
@nohwnd nohwnd added this to the V4 milestone Jan 22, 2017
JPRuskin added a commit to JPRuskin/Pester that referenced this issue Jul 14, 2017
Fix for:
 - Unexpected output when passing hashtable to Invoke-Pester pester#699
 - Bug in output where multiple Paths are passed in to -Scripts at Invoke-Pester pester#710

Changes:
 - Simply tests if there is a path property, if so uses it for the message formatting. Otherwise, falls back to original method.
 - `-join ', '` was used to provide consistency with current messages, as the default ("', '") has no bracketing quotes.
@nohwnd nohwnd self-assigned this Jul 31, 2017
nohwnd added a commit that referenced this issue Aug 12, 2017
Added formatting function and tests, did only basic testing because the Write-Host cannot be mocked in Write-PesterStart and I don't want to dig too deep into the code.

Fix #699 
Fix #710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant