Skip to content

Commit

Permalink
Merge pull request #322 from dlwyatt/WriteProgress
Browse files Browse the repository at this point in the history
Adding some Write-Progress output to It
  • Loading branch information
dlwyatt committed Apr 28, 2015
2 parents 4cf58eb + a8af2e2 commit 7359214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Functions/It.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ function Invoke-Test
}
else
{
Write-Progress -Activity "Running test '$Name'" -Status Processing

$errorRecord = $null
try
{
Expand Down Expand Up @@ -264,6 +266,7 @@ function Invoke-Test
$result = Get-PesterResult -Test $ScriptBlock -ErrorRecord $errorRecord
$orderedParameters = Get-OrderedParameterDictionary -ScriptBlock $ScriptBlock -Dictionary $Parameters
$Pester.AddTestResult( $result.name, $result.Result, $null, $result.FailureMessage, $result.StackTrace, $ParameterizedSuiteName, $orderedParameters )
Write-Progress -Activity "Running test '$Name'" -Completed -Status Processing
}

if ($null -ne $OutputScriptBlock)
Expand Down
2 changes: 2 additions & 0 deletions Pester.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ about_pester
$pester = New-PesterState -TestNameFilter $TestName -TagFilter ($Tag -split "\s") -ExcludeTagFilter ($ExcludeTag -split "\s") -SessionState $PSCmdlet.SessionState -Strict:$Strict -Quiet:$Quiet
Enter-CoverageAnalysis -CodeCoverage $CodeCoverage -PesterState $pester

Write-Screen "`r`n`r`n`r`n`r`n"

$invokeTestScript = {
param (
[Parameter(Position = 0)]
Expand Down

0 comments on commit 7359214

Please sign in to comment.