Multiple Callback Resolver
This project contains a simple class that allows you to instantiate callback functions and then execute a final callback when all of the generated callbacks complete. This is especially useful in testing that a set of events is emitted in a test case or in fanning out a set of work and running some code after all of a set of callbacks has been invoked.
Let's say you have a class called Something
and it emits 3 events when
when the run()
method is processed.
var Resolver = ;var resolver = ;resolver
Optionally, you may set a timeout:
var Resolver = ;var callbacks = Resolver