Expects promise to be a function.