GITOPS-10535: add unit tests for core string and URL utilities - #264
GITOPS-10535: add unit tests for core string and URL utilities#264trdoyle81 wants to merge 1 commit into
Conversation
Signed-off-by: trdoyle <trdoyle@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change updates PatternFly mocks and action dropdown snapshots. It also expands Git URL parsing tests and configures TypeScript for the default ChangesPatternFly mock behavior
Git URL utility coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR adds unit coverage and test configuration updates without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
==========================================
- Coverage 11.39% 11.34% -0.05%
==========================================
Files 168 169 +1
Lines 6627 6679 +52
Branches 2274 2235 -39
==========================================
+ Hits 755 758 +3
- Misses 5635 5920 +285
+ Partials 237 1 -236
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds unit tests for core git string/URL helpers (
stringHelpers,urls) covering happy paths and edge cases (empty/malformed URLs, SHA detection, provider parsing).Some updates:
esModuleInteropsogit-url-parsedefault import works under JestJira:
https://redhat.atlassian.net/browse/GITOPS-10535
Note:
Will need to be ported to release-4.18 also.
Run tests:
$ pnpm test
$ pnpm test -- src/gitops/utils/stringHelpers.test.ts src/gitops/utils/urls.test.ts