I have a situation where I need to check if a function returns a promise, the problem is, its a browser implemented function and some browsers DO return a promise and some don't. I was checking: How do I tell if an object is a Promise?, to see how to check if a function returns a promise and it recommends using Promise.resolve(). But what exactly happens when you call Promise.resolve() on a non-promisified function?
I tried reading this, but i wasn't able to find an answer to the question exactly: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve