Tests functionality of Runtime.awaitPromise.