Most of time, when we want to test function call inside a promise, we can do:
it('Should be async', function(done) { someAsyncFunction().then(function(result) { expect(result).toBe(true); done(); }); });
It is important to call 'done()', otherwise, the code won't call the promise is finished.