gaelcolas / Sampler

Module template with build pipeline and examples, including DSC elements.
MIT License
172 stars 42 forks source link

Code coverage is always rounded to the closest integer and does not show the real coverage percentage #302

Closed johlju closed 3 years ago

johlju commented 3 years ago

The following row must be change to the datatype System.Decimal (which is used by the Pester object) so that the value can be correctly format on a row further down.

https://github.com/gaelcolas/Sampler/blob/7ca89da121719f111895a751be3b399f456bb006/.build/tasks/Invoke-Pester.pester.build.ps1#L990

Shown here that the Pester object is using Decimal.

PS > $pesterObject.CodeCoverage.CoveragePercent
96,969696969697
PS > $pesterObject.CodeCoverage.CoveragePercent.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Decimal                                  System.ValueType