Extension of Jasmine unit tests to support Promises and wait for the promise to resolve or reject.