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

Adding some Write-Progress output to It #322

Merged
merged 1 commit into from
Apr 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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