You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Methods in classes are displayed in code coverage as just the method's name.
Having ClassName.MethodName would make the code coverage report much easier to navigate.
I read the previous issues about classes and code coverage but didn't understand the problem.
Is there some technical reason why we throw away the name of the class?
For example, in cobertura, we have this XML, where the filename has replaced the class.
The ToString() method is part of a Person class, and also part of an Employee class but this is information is lost.
Describe cc {
import-module-Name $PSSCriptRoot\cc.psm1
Context mod {
InModuleScope cc {
It 'Should have a Person.ToString() method' {
[Person]::new().ToString() | Should -Be 'A Person'
}
It 'Should have an Employee.ToString() method' {
[Employee]::new().ToString() | Should -Be 'An Employee'
}
}
}
}
Checklist
What is the issue?
Methods in classes are displayed in code coverage as just the method's name.
Having ClassName.MethodName would make the code coverage report much easier to navigate.
I read the previous issues about classes and code coverage but didn't understand the problem.
Is there some technical reason why we throw away the name of the class?
For example, in cobertura, we have this XML, where the filename has replaced the class.
The
ToString()
method is part of aPerson
class, and also part of anEmployee
class but this is information is lost.Expected Behavior
I would have expected to see
Person.ToString()
as the method name instead ofToString()
That way, I can tell it apart from
Employee.ToString()
later in the same file.Steps To Reproduce
Describe your environment
Possible Solution?
No response
The text was updated successfully, but these errors were encountered: