jhugman / uniffi-bindgen-react-native

A uniffi bindings generator for calling Rust from react-native
Other
0 stars 0 forks source link

Add event loop to test-runner #31

Closed jhugman closed 1 month ago

jhugman commented 1 month ago

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:

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.

This is done implicitly by the asyncTest method.