Reputation: 1
I have added protractor-angular-screenshot-reporter in my config able to generate report but in console i am getting error "Unhanded promise rejection
Upvotes: 0
Views: 294
Reputation: 68645
This error is given you where you have code like this
.then(() => console.log('Success')); // second parameter is for rejection function
Here I have missed the reject
function to pass to then
as the second parameter. So you need to pass it also to pass the compiler. You need to have a code part where you can handle the errors which comes from asynchronous parts of your code.
.then(() => console.log('Success'), (err) => console.log(err));
For each Promise in your code you need to pass also a logic to run in an error case of your application.
Upvotes: 1