-
Notifications
You must be signed in to change notification settings - Fork 138
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(InterstitialScreen): increase code coverage #6316
test(InterstitialScreen): increase code coverage #6316
Conversation
✅ Deploy Preview for ibm-products-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-for-ibm-products ready!
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 #6316 +/- ##
==========================================
+ Coverage 78.68% 79.06% +0.38%
==========================================
Files 395 395
Lines 12880 12880
Branches 4256 4256
==========================================
+ Hits 10134 10183 +49
+ Misses 2746 2697 -49
|
}); | ||
const closeBtn = screen.getByLabelText('Close'); | ||
await act(() => userEvent.click(closeBtn)); | ||
expect(onClose).toBeCalled(); |
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.
Just a note, you could use .toHaveBeenCalledTimes(1)
here to make sure it's called the number of times expected.
bc3fa66
Closes #6264
Increased code coverage
What did you change?
packages/ibm-products/src/components/InterstitialScreen/InterstitialScreen.test.js
packages/ibm-products/src/components/InterstitialScreen/InterstitialScreen.tsx
How did you test and verify your work? yarn test coverage:report