Fixed async tests to return properly promises.

@mikaelkaron Can you check if this fix it for you?