mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
feead8f299
Summary: This test currently uses `jest.runAllTicks()` to execute cached, immediately-resolving promises, under Jest "legacy" timers (the RN default) - this works only because [we polyfill Promise](https://github.com/facebook/react-native/blob/main/jest/setup.js#L24) using a userland JavaScript implementation that internally uses mocked-out timer functions. Here we change to a more universal approach by adding a new microtask/promise to the end of the queue and awaiting it. This allows us to remove our Promise polyfill from Jest setup (to follow). Changelog: [Internal][Fixed] - Prepare `LogBoxLog-test.js` for native promises Reviewed By: huntie Differential Revision: D39418413 fbshipit-source-id: 1384ef385b1e10261754513369af8997d296ffea