We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e96bd5 commit 405be70Copy full SHA for 405be70
1 file changed
Tests/Public/Convert-CodeCoverage.Tests.ps1
@@ -0,0 +1,25 @@
1
+Describe "Convert-CodeCoverage"
2
+
3
+ It 'Should extract code coverage from Pester objects and add Source conversions' {
4
5
+ # Note: Pester does not currently apply custom types...
6
+ $PesterResults = [PSCustomObject]@{
7
+ CodeCoverage = [PSCustomObject]@{
8
+ MissedCommands = [PSCustomObject]@{
9
+ # Note these don't really matter
10
+ Command = $ModuleSource[25]
11
+ Function = 'CopyReadme'
12
+ # these are pipeline bound
13
+ File = $ModulePath
14
+ Line = 25
15
+ }
16
17
18
19
+ $SourceLocation = $PesterResults | Convert-CodeCoverage
20
21
+ $SourceLocation.SourceFile | Should -Be ".\Private\CopyReadme.ps1"
22
+ $SourceLocation.SourceLineNumber | Should -Be 24
23
+ $SourceLocation.Function | Should -Be 'CopyReadme'
24
25
+}
0 commit comments