Suppose I have a function which returns promises sampleFunciton.js:
exports.someFunction = async(param1,param2) =>{ return new Promise((r