Use this if you want run several asynchronous tasks concurrently and run a function when all the results come back. (E.g. if you want to make multiple web requests or database queries, then use them together).
var wg = ;wg;;wg;;wg;;wg;
Increments the WaitGroup counter
Decrements the WaitGroup counter. When the counter becomes
0, the function
wait() will be called.
Registers a callback to be called when all tasks in the WaitGroup are done.
Run the tests with