Add test coverage for CalculateStorageSize and FormatDuration utility functions#5
Merged
AlbinJohns-wk merged 3 commits intotest-ut-workflow-v2from Dec 12, 2025
Merged
Conversation
…unctions - Added TestCalculateStorageSize with 17 test cases covering: - Valid sizes with binary units (Gi, Mi, Ti, Ki) - Valid sizes with decimal units (G, M, T, k) - Various edge cases (zero, single byte, etc.) - Error cases (empty string, invalid formats, negative values) - Added TestFormatDuration with 26 test cases covering: - Milliseconds formatting - Seconds only formatting - Minutes only formatting - Minutes and seconds formatting - Hours only formatting - Hours and minutes formatting - Large durations - Achieved >90% coverage for both functions: - CalculateStorageSize: 90.9% - FormatDuration: 100.0% - Overall package coverage increased from 74.8% to 96.4% Co-authored-by: AlbinJohns-wk <220135713+AlbinJohns-wk@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Test UT workflow v2 for code changes
Add test coverage for CalculateStorageSize and FormatDuration utility functions
Dec 12, 2025
Owner
|
@copilot instead of adding comment on the gitignore just delete the coverage files and don't commit them manually |
The coverage files were temporary and shouldn't be tracked. Removed the gitignore entry as requested. Co-authored-by: AlbinJohns-wk <220135713+AlbinJohns-wk@users.noreply.github.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.