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

chore: add integration test for driving promises with fake timers #7071

Merged
merged 2 commits into from Oct 2, 2018

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Sep 29, 2018

Summary

Based on my understanding on how FB uses fake timers to drive promises synchronously, adding a couple of integration tests.

Related to #5165.

Test plan

Green CI

@SimenB
Copy link
Member Author

SimenB commented Sep 29, 2018

I'd love to not have the immediates one, as Lolex currently doesn't have an API for that. So if we can use the one backed by asap (meaning require('promise'); and not require('promise/setimmediate');) it'll work out of the box. But I'm not sure which of them is used at FB?

@rubennorte
Copy link
Contributor

@SimenB we use two different implementations but both of them use setImmediate under the hood.

@SimenB SimenB merged commit 78e0893 into jestjs:master Oct 2, 2018
@SimenB SimenB deleted the synchronous-promise branch October 2, 2018 09:16
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants