A

async-wait-for-promise

NPM package that makes it easy to wait for a certain promise resolution condition or timeout.

https://www.npmjs.com/package/async-wait-for-promise