ryanw-mobile / OctoMeter

🔥Kotlin Multiplatform Desktop/Android/iOS Energy Tracker app
Other
126 stars 10 forks source link

Add unit tests #209

Closed ryanw-mobile closed 3 months ago

ryanw-mobile commented 3 months ago

Add some unit tests to uplift the coverage - as well as to make sure the conversion and model functions works as intended

codacy-production[bot] commented 3 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +4.57% (target: -1.00%) :white_check_mark: 81.40%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (b5cde2180c2017a4e0a8b9d824be265f9f9d9b87) | 1708 | 779 | 45.61% | | | Head commit (1254884743cf875cd524769411bee8dde3ea9289) | 1708 (+0) | 857 (+78) | 50.18% (**+4.57%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#209) | 43 | 35 | **81.40%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences


:rocket: Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 81.39535% with 8 lines in your changes missing coverage. Please review.

Project coverage is 46.68%. Comparing base (b5cde21) to head (1254884).

Files Patch % Lines
...om/rwmobi/kunigami/ui/viewmodels/UsageViewModel.kt 0.00% 7 Missing :warning:
...om/rwmobi/kunigami/ui/viewmodels/AgileViewModel.kt 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #209 +/- ## ========================================== + Coverage 42.55% 46.68% +4.13% ========================================== Files 91 91 Lines 1645 1645 Branches 226 226 ========================================== + Hits 700 768 +68 + Misses 888 812 -76 - Partials 57 65 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.