testing a setTimeout() on promise calls