Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove node promise rejection in case of error #2797

Conversation

gravityvi
Copy link
Member

Changes

  • remove rejection of node promise. It creates unhanded rejection error.

Impact

@@ -77,7 +77,6 @@ class AsyncTree extends EventEmitter{
let abortOnFailure = false;

if (result instanceof Error) {
node.reject(result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this added recently, and something that was working fine before?
Because i believe the issue reported is a regression right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this was not added recently but as and when the node promise is rejected, the user needs to handle the rejection in the script or the scripts ends in between.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I am confused, the issue raised is a regression, meaning it was working fine until some change that we did. So user hasnt changed their script, they just upgraded the version right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, perhaps I need to dig up further how the rejection was being handled in previous versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, whatever it is, it's fixed. Great work Ravi :)

timeout: 15,
retryInterval: 15
});
await client.verify.elementPresent('#weblogin');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about if we chain these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regress] Rest of the assertion/code in async test case is not executed when verify() fails
3 participants