test(react): increase coverage for DatePicker#21833
test(react): increase coverage for DatePicker#21833adamalston wants to merge 1 commit intocarbon-design-system:mainfrom
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21833 +/- ##
==========================================
+ Coverage 87.75% 94.83% +7.07%
==========================================
Files 536 537 +1
Lines 43637 45101 +1464
Branches 6696 7950 +1254
==========================================
+ Hits 38293 42770 +4477
+ Misses 5193 2187 -3006
+ Partials 151 144 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I don't plan to mark this pull request as ready for review until some of my earlier pull requests have been reviewed. I want to avoid diverting attention from them. Otherwise, these changes are ready to go. |
No issue.
Increased test coverage for
DatePickerand deleted dead code.Changelog
Changed
DatePicker.Removed
DatePicker.Testing / Reviewing
I deleted dead code:
calendar.selectedDatescomes from Flatpickr and is always an array, soif (!calendar.selectedDates) return;is redundant.valueis reset to an empty value. The uncoveredclearappears to be redundant because the earlier effect already handles the same case.carbon/packages/react/src/components/DatePicker/DatePicker.tsx
Line 944 in b4297c5
yarn test --coverage \ --runTestsByPath packages/react/src/components/DatePicker/DatePicker-test.js \ --collectCoverageFrom=packages/react/src/components/DatePicker/DatePicker.tsxPR Checklist
As the author of this PR, before marking ready for review, confirm you:
Updated documentation and storybook examplesMore details can be found in the pull request guide