Skip to content

Commit

Permalink
Coverage tests fix
Browse files Browse the repository at this point in the history
Previous tests forgot to call Exit-CoverageAnalysis, and left a bunch of orphaned breakpoints in the session as a result.
  • Loading branch information
dlwyatt committed Jul 4, 2014
1 parent 7e362a4 commit 4761c5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Functions/Coverage.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ InModuleScope Pester {
It 'Reports the correct missed command' {
$coverageReport.MissedCommands[0].Command | Should Be "'I am function two. I never get called.'"
}

Exit-CoverageAnalysis -PesterState $testState
}

Context 'Single function with missed commands' {
Expand Down Expand Up @@ -92,6 +94,8 @@ InModuleScope Pester {
It 'Reports the correct missed command' {
$coverageReport.MissedCommands[0].Command | Should Be "'I am function two. I never get called.'"
}

Exit-CoverageAnalysis -PesterState $testState
}

Context 'Single function with no missed commands' {
Expand All @@ -117,6 +121,8 @@ InModuleScope Pester {
It 'Reports the proper number of missed commands' {
$coverageReport.MissedCommands.Count | Should Be 0
}

Exit-CoverageAnalysis -PesterState $testState
}

Context 'Range of lines' {
Expand All @@ -142,6 +148,8 @@ InModuleScope Pester {
It 'Reports the proper number of missed commands' {
$coverageReport.MissedCommands.Count | Should Be 0
}

Exit-CoverageAnalysis -PesterState $testState
}

Context 'Wildcard resolution' {
Expand Down Expand Up @@ -175,6 +183,8 @@ InModuleScope Pester {
It 'Reports the correct missed command' {
$coverageReport.MissedCommands[0].Command | Should Be "'I am function two. I never get called.'"
}

Exit-CoverageAnalysis -PesterState $testState
}
}
}

0 comments on commit 4761c5e

Please sign in to comment.