-
Notifications
You must be signed in to change notification settings - Fork 470
Leaking waitFor
callback against jasmine
when the clock
is mocked
#1270
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
Comments
Uh oh! @KevinBon, the image you shared is missing helpful alt text. Check your issue body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Uh oh! @KevinBon, the image you shared is missing helpful alt text. Check your issue body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Uh oh! @KevinBon, the image you shared is missing helpful alt text. Check your issue body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Uh oh!
There was an error while loading. Please reload this page.
@testing-library/dom
version: 9.3.1@testing-library/react
version 14.0.0[email protected]
Relevant code or config:
What you did:
I added logs to demonstrate that the
waitFor
callback has been called even after it has been resolved from a timeout.What happened:
After the
waitFor
is resolved (see:spec finished: ✅
),spec waitfor:callback
is still being invoked.PS: Log points added to surface internal
react-testing-library
,dom-testing-library
andjasmine
callsReproduction:
Problem description:
The following issue can only be seen when the jasmine.Clock is installed against
waitFor
.To prevent any side-effect (e.g: the
waitFor
callback modifies the global environment), thewaitFor
callback should never be invoked once it "finishes/resolves"Suggested solution:
#1271
The text was updated successfully, but these errors were encountered: