-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(SideNav): #17491 increased unit test coverage #17869
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17869 +/- ##
==========================================
+ Coverage 80.19% 80.45% +0.25%
==========================================
Files 406 406
Lines 14041 14041
Branches 4399 4347 -52
==========================================
+ Hits 11260 11296 +36
+ Misses 2614 2579 -35
+ Partials 167 166 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
I see that there are couple line that weren't tested, but I guess those lines are not possible to be tested, right?
https://app.codecov.io/gh/carbon-design-system/carbon/pull/17869/blob/packages/react/src/components/UIShell/SideNav.tsx
@kennylam Please review this PR |
@alisonjoseph Please review this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ashna000
Looks like the Files changetestd is missing the test file for some reason. Maybe got lost in a commit.
Hey @ashna000 Do you think you could test the Example in carbon: carbon/packages/react/src/components/Menu/Menu-test.js Lines 151 to 156 in 1232b5e
Example in Stack Overflow: https://stackoverflow.com/questions/75952818/how-to-write-jest-test-case-for-moveover-and-mouseleave-for-functional-component#:~:text=simulate(%27-,mouseleave,-%27)%3B%0A%20%20%20%20expect |
Closes #17491
This PR adds unit tests for the SideNav component to ensure its proper rendering and functionality. These tests ensure that this component renders with the appropriate class names, accommodates custom class names, and correctly applies additional props.
Changelog
Changed
Testing / Reviewing
Additional Notes
Please let me know if any further modifications are needed or if you have any questions regarding the changes.