Let us suppose that we\'ve got a function that resolves a promise like below:
function timeoutPromise(interval) { return new Promise((resolve, reject) =>