Return a resolved promise with Promise.resolve
When I wanted to return a promise which is already resolved, I used to do this:
return new Promise(resolve => resolve(value))
But it can be done in a simpler way like this:
return Promise.resolve(value)
More about Promise.resolve
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve