a promise that rejects if the function throws an error (e.g., if an expect test doesn't pass), and resolves otherwise.
The first emission for which the find function returns true will be tested in the test function. If the find function is not given, the first signal emission will be tested.
You can test to see if any signal comes which matches a criteria by just giving a find function. You can test the very first signal by just giving a test function. And you can test the first signal matching the find criteria by giving both.
The reason this function is asynchronous is so that the thing causing the signal emission (such as a websocket message) can be asynchronous.
Test a single emission from a signal.