Added global 'wait' function to defer tests

This signals mocha to pause processing files while tests are generated
asynchronously