an implementation of the ReactCommon::CallInvoker interface
an asyncTest method to the asserts library
The runner now runs until there are no more tasks left, either from setTimeout or
from in-flght callbacks on other threads.
This does not need to be more robust than that: any long-running Rust tasks should
protect the test-runner from exiting by setting a timeout in the test.
According to The Big O of Code Reviews, this is a O(n) change.
This PR adds a crude event loop to the test runner. Specifically:
setTimeout
/clearTimeout
/setImmediate
. This is largely derived from https://github.com/tmikov/hermes-jsi-demos/blob/master/evloop/evloop.cppReactCommon::CallInvoker
interfaceasyncTest
method to the asserts libraryThe runner now runs until there are no more tasks left, either from
setTimeout
or from in-flght callbacks on other threads.This does not need to be more robust than that: any long-running Rust tasks should protect the test-runner from exiting by setting a timeout in the test.
This is done implicitly by the
asyncTest
method.