Passing proper arguments to fulfil and reject from the promise resolver