react-native/jest
Samuel Susla 89a7238acd
Some checks are pending
Label closed PR as merged and leave a comment / comment-and-label (push) Waiting to run
Publish Bumped Packages / publish_bumped_packages (push) Waiting to run
Update node modules cache / update_node_modules_cache (push) Waiting to run
introduce ability to flush messege queue from tests (#47646)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47646

changelog: [internal]

In order to control scheduling of tests, test setup must be separated from test running. This is because of how internal scheduling of React Native is restricted until bundle is loaded via BufferedRuntimeExecutor. This is the reason for executing tests by calling global function `$$RunTests$$`. This is not a pretty solution but it is hidden within testing infrastructure and users of our test infra are not exposed to this.

There is a new method exposed to JavaScript: flushMessageQueue. This will flush everything that is inside of message queue. This is the queue where tasks are queued whenever RuntimeScheduler enqueues something by calling `runtimeExecutor_`.

Reviewed By: christophpurrer

Differential Revision: D65951894

fbshipit-source-id: 2e8e0c10fbeb998f4a51ee6d01ef229eb5f70448
2024-11-17 03:30:31 -08:00
..
integration introduce ability to flush messege queue from tests (#47646) 2024-11-17 03:30:31 -08:00
preprocessor.js RN: Fix lint/sort-imports Errors (#47109) 2024-10-18 04:07:02 -07:00