Skip to content
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

fix(setImmediate): make code resilient to setImmediate not existing #917

Conversation

facundop3
Copy link

What:
Remove assumptions of setImmediate and clearImmediate and make it resilient to setImmediate not existing

Why:
Fix: #914

How:
Asking if setImmediate is a function before adding it to timerAPI object and refactoring waitForDomChange function to use setTimeout in place of setImmediate

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • Typescript definitions updated
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 25, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cfe6c91:

Sandbox Source
react-testing-library-examples Configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When running in Jest, code assumes setImmediate and clearImmediate
1 participant