-
Notifications
You must be signed in to change notification settings - Fork 111
Bump DTL major version #125
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
Conversation
src/__tests__/stopwatch.js
Outdated
@@ -17,7 +17,7 @@ test('updates component state', async () => { | |||
getByText('Stop') | |||
|
|||
// Wait for one tick of the event loop. | |||
await wait() | |||
await wait(() => {}) |
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.
Note that this is probably not how I would test a stopwatch. I would prefer jest.useFakeTimers
(in which case you'd need to use act
).
Maybe this: https://github.com/kentcdodds/react-testing-library-course/blob/5b1a2d10fa140eae1ea36ec47cc3f52d3edaa90d/src/__tests__/unmounting.js or this: https://github.com/kentcdodds/testing-docs-rtl-examples/blob/cf6b0f3c74287b7b6bca745bc28827c8a2c0c4ee/src/card.test.js can help :)
Thanks!
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 67 67
Branches 13 13
=====================================
Hits 67 67
Continue to review full report at Codecov.
|
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.